2017-11-03 16:52:21 +11:00
|
|
|
/*
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2018-03-09 11:58:02 +11:00
|
|
|
class Geary.Imap.CreateCommandTest : TestCase {
|
2017-11-03 16:52:21 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
public CreateCommandTest() {
|
|
|
|
|
base("Geary.Imap.CreateCommandTest");
|
2018-03-07 17:30:14 +11:00
|
|
|
add_test("basic_create", basic_create);
|
|
|
|
|
add_test("special_use", special_use);
|
2017-11-03 16:52:21 +11:00
|
|
|
}
|
|
|
|
|
|
2018-03-07 17:30:14 +11:00
|
|
|
public void basic_create() throws Error {
|
2018-07-12 12:38:32 +10:00
|
|
|
assert_string(
|
|
|
|
|
"---- create owatagusiam/",
|
|
|
|
|
new CreateCommand(new MailboxSpecifier("owatagusiam/")).to_string()
|
|
|
|
|
);
|
2017-11-03 16:52:21 +11:00
|
|
|
}
|
|
|
|
|
|
2018-03-07 17:30:14 +11:00
|
|
|
public void special_use() throws Error {
|
2018-07-12 12:38:32 +10:00
|
|
|
assert_string(
|
|
|
|
|
"---- create Everything (use (\\All))",
|
|
|
|
|
new CreateCommand.special_use(
|
|
|
|
|
new MailboxSpecifier("Everything"),
|
|
|
|
|
SpecialFolderType.ALL_MAIL
|
|
|
|
|
).to_string()
|
|
|
|
|
);
|
2017-11-03 16:52:21 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|