Make Imap.Command a top-level type rather than inherit from Parameter.

Instead, make the args property a parameter list, and add params to that.

This means Command's serialize method have a different signature compared
to Parameter's, letting us do some more interesting things with it.
This commit is contained in:
Michael James Gratton 2018-07-12 12:38:32 +10:00
parent 1de86f3316
commit ab9d0c27ad
14 changed files with 196 additions and 186 deletions

View file

@ -15,15 +15,20 @@ class Geary.Imap.CreateCommandTest : TestCase {
}
public void basic_create() throws Error {
assert(new CreateCommand(new MailboxSpecifier("owatagusiam/")).to_string() ==
"---- create owatagusiam/");
assert_string(
"---- create owatagusiam/",
new CreateCommand(new MailboxSpecifier("owatagusiam/")).to_string()
);
}
public void special_use() throws Error {
assert(new CreateCommand.special_use(
new MailboxSpecifier("Everything"),
SpecialFolderType.ALL_MAIL
).to_string() == "---- create Everything (use (\\All))");
assert_string(
"---- create Everything (use (\\All))",
new CreateCommand.special_use(
new MailboxSpecifier("Everything"),
SpecialFolderType.ALL_MAIL
).to_string()
);
}
}