use of com.fsck.k9.controller.MessagingControllerCommands.PendingMoveOrCopy in project k-9 by k9mail.
the class PendingCommandSerializerTest method testSerializeDeserialize__withComplexArguments.
@Test
public void testSerializeDeserialize__withComplexArguments() {
PendingCommand pendingCommand = PendingMoveOrCopy.create(SOURCE_FOLDER, DEST_FOLDER, IS_COPY, UID_MAP);
String serializedCommand = pendingCommandSerializer.serialize(pendingCommand);
PendingMoveOrCopy unserializedCommand = (PendingMoveOrCopy) pendingCommandSerializer.unserialize(DATABASE_ID, pendingCommand.getCommandName(), serializedCommand);
assertEquals(DATABASE_ID, unserializedCommand.databaseId);
assertEquals(SOURCE_FOLDER, unserializedCommand.srcFolder);
assertEquals(DEST_FOLDER, unserializedCommand.destFolder);
assertEquals(UID_MAP, unserializedCommand.newUidMap);
}
Aggregations