Add unit tests for NAMESPACE parsing, CREATE serialisation, fix an error.
This commit is contained in:
parent
13f8aa88ca
commit
21421f8d48
5 changed files with 178 additions and 4 deletions
29
test/engine/imap/command/imap-create-command-test.vala
Normal file
29
test/engine/imap/command/imap-create-command-test.vala
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* 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 : Gee.TestCase {
|
||||
|
||||
|
||||
public CreateCommandTest() {
|
||||
base("Geary.Imap.CreateCommandTest");
|
||||
add_test("test_basic_create", test_basic_create);
|
||||
add_test("test_special_use", test_special_use);
|
||||
}
|
||||
|
||||
public void test_basic_create() {
|
||||
assert(new CreateCommand(new MailboxSpecifier("owatagusiam/")).to_string() ==
|
||||
"---- create owatagusiam/");
|
||||
}
|
||||
|
||||
public void test_special_use() {
|
||||
assert(new CreateCommand.special_use(
|
||||
new MailboxSpecifier("Everything"),
|
||||
SpecialFolderType.ALL_MAIL
|
||||
).to_string() == "---- create Everything (use (\\All))");
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue