geary/test/engine/imap-db/imap-db-email-identifier-test.vala
Michael James Gratton dd3a7a1bc8 Add API for (de)serialising FolderPath and EmailIdentifier
Supports (de)serialising via GLib.Variant for use as GLib.Action targets
transmission via DBus, etc.
2019-04-17 09:06:24 +10:00

26 lines
759 B
Vala

/*
* Copyright 2019 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.
*/
public class Geary.ImapDB.EmailIdentifierTest : TestCase {
public EmailIdentifierTest() {
base("Geary.ImapDB.EmailIdentifierTest");
add_test("variant_representation", variant_representation);
}
public void variant_representation() throws GLib.Error {
EmailIdentifier orig = new EmailIdentifier(
123, new Imap.UID(321)
);
GLib.Variant variant = orig.to_variant();
EmailIdentifier copy = new EmailIdentifier.from_variant(variant);
assert_true(orig.equal_to(copy));
}
}