use of com.fsck.k9.mailstore.migrations.MigrationTo60.OldPendingCommand in project k-9 by k9mail.
the class MigrationTo60Test method migrateExpunge.
@Test
public void migrateExpunge() {
OldPendingCommand command = queueExpunge(SOURCE_FOLDER);
PendingExpunge pendingCommand = (PendingExpunge) MigrationTo60.migratePendingCommand(command);
assertEquals(SOURCE_FOLDER, pendingCommand.folder);
}
use of com.fsck.k9.mailstore.migrations.MigrationTo60.OldPendingCommand in project k-9 by k9mail.
the class MigrationTo60Test method queueMoveOrCopyOld.
OldPendingCommand queueMoveOrCopyOld(String srcFolder, String destFolder, boolean isCopy, String[] uids) {
OldPendingCommand command = new OldPendingCommand();
command.command = PENDING_COMMAND_MOVE_OR_COPY_BULK;
int length = 3 + uids.length;
command.arguments = new String[length];
command.arguments[0] = srcFolder;
command.arguments[1] = destFolder;
command.arguments[2] = Boolean.toString(isCopy);
System.arraycopy(uids, 0, command.arguments, 3, uids.length);
return command;
}
use of com.fsck.k9.mailstore.migrations.MigrationTo60.OldPendingCommand in project k-9 by k9mail.
the class MigrationTo60Test method queueMoveOrCopyEvenOlder.
OldPendingCommand queueMoveOrCopyEvenOlder(String srcFolder, String destFolder, String uid, boolean isCopy) {
OldPendingCommand command = new OldPendingCommand();
command.command = PENDING_COMMAND_MOVE_OR_COPY;
command.arguments = new String[4];
command.arguments[0] = srcFolder;
command.arguments[1] = uid;
command.arguments[2] = destFolder;
command.arguments[3] = Boolean.toString(isCopy);
return command;
}
use of com.fsck.k9.mailstore.migrations.MigrationTo60.OldPendingCommand in project k-9 by k9mail.
the class MigrationTo60Test method queueExpunge.
OldPendingCommand queueExpunge(String folderName) {
OldPendingCommand command = new OldPendingCommand();
command.command = PENDING_COMMAND_EXPUNGE;
command.arguments = new String[1];
command.arguments[0] = folderName;
return command;
}
use of com.fsck.k9.mailstore.migrations.MigrationTo60.OldPendingCommand in project k-9 by k9mail.
the class MigrationTo60Test method queueMarkAllMessagesRead.
OldPendingCommand queueMarkAllMessagesRead(final String folder) {
OldPendingCommand command = new OldPendingCommand();
command.command = PENDING_COMMAND_MARK_ALL_AS_READ;
command.arguments = new String[] { folder };
return command;
}
Aggregations