Search in sources :

Example 1 with PendingEmptyTrash

use of com.fsck.k9.controller.MessagingControllerCommands.PendingEmptyTrash in project k-9 by k9mail.

the class PendingCommandSerializerTest method testSerializeDeserialize__withoutArguments.

@Test
public void testSerializeDeserialize__withoutArguments() {
    PendingCommand pendingCommand = PendingEmptyTrash.create();
    String serializedCommand = pendingCommandSerializer.serialize(pendingCommand);
    PendingEmptyTrash unserializedCommand = (PendingEmptyTrash) pendingCommandSerializer.unserialize(DATABASE_ID, pendingCommand.getCommandName(), serializedCommand);
    assertEquals(DATABASE_ID, unserializedCommand.databaseId);
}
Also used : PendingEmptyTrash(com.fsck.k9.controller.MessagingControllerCommands.PendingEmptyTrash) PendingCommand(com.fsck.k9.controller.MessagingControllerCommands.PendingCommand) Test(org.junit.Test)

Example 2 with PendingEmptyTrash

use of com.fsck.k9.controller.MessagingControllerCommands.PendingEmptyTrash in project k-9 by k9mail.

the class MigrationTo60Test method migrateEmptyTrash.

@Test
public void migrateEmptyTrash() {
    OldPendingCommand command = queueEmptyTrash();
    PendingCommand pendingCommand = MigrationTo60.migratePendingCommand(command);
    assertTrue(pendingCommand instanceof PendingEmptyTrash);
}
Also used : PendingEmptyTrash(com.fsck.k9.controller.MessagingControllerCommands.PendingEmptyTrash) PendingCommand(com.fsck.k9.controller.MessagingControllerCommands.PendingCommand) OldPendingCommand(com.fsck.k9.mailstore.migrations.MigrationTo60.OldPendingCommand) OldPendingCommand(com.fsck.k9.mailstore.migrations.MigrationTo60.OldPendingCommand) Test(org.junit.Test)

Aggregations

PendingCommand (com.fsck.k9.controller.MessagingControllerCommands.PendingCommand)2 PendingEmptyTrash (com.fsck.k9.controller.MessagingControllerCommands.PendingEmptyTrash)2 Test (org.junit.Test)2 OldPendingCommand (com.fsck.k9.mailstore.migrations.MigrationTo60.OldPendingCommand)1