File: imap-create-command-test.vala

package info (click to toggle)
geary 46.0-12
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 15,092 kB
  • sloc: javascript: 972; ansic: 722; sql: 247; xml: 183; python: 30; makefile: 28; sh: 24
file content (35 lines) | stat: -rw-r--r-- 952 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * Copyright 2017 Michael Gratton <mike@vee.net>
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later). See the COPYING file in this distribution.
 */

class Geary.Imap.CreateCommandTest : TestCase {


    public CreateCommandTest() {
        base("Geary.Imap.CreateCommandTest");
        add_test("basic_create", basic_create);
        add_test("special_use", special_use);
    }

    public void basic_create() throws Error {
        assert_equal(
            new CreateCommand(new MailboxSpecifier("owatagusiam/"), null).to_string(),
            "---- create owatagusiam/"
        );
    }

    public void special_use() throws Error {
        assert_equal(
            new CreateCommand.special_use(
                new MailboxSpecifier("Everything"),
                ALL_MAIL,
                null
            ).to_string(),
            "---- create Everything (use (\\All))"
        );
    }

}