geary/test/engine/imap/command/imap-create-command-test.vala
Michael James Gratton 50f73ff252 Allow test fixtures and test methods to throw errors by default.
* test/testcase.vala (TestCase): Add a generic throws clause to both
  TestMethod and set_up and tear_down, update subclasses.
2018-04-07 09:41:18 +10:00

29 lines
898 B
Vala

/*
* 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("basic_create", basic_create);
add_test("special_use", special_use);
}
public void basic_create() throws Error {
assert(new CreateCommand(new MailboxSpecifier("owatagusiam/")).to_string() ==
"---- create owatagusiam/");
}
public void special_use() throws Error {
assert(new CreateCommand.special_use(
new MailboxSpecifier("Everything"),
SpecialFolderType.ALL_MAIL
).to_string() == "---- create Everything (use (\\All))");
}
}