use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by signalapp.
the class FastJobStorageTest method updateJobAfterRetry_writesToDatabase.
@Test
public void updateJobAfterRetry_writesToDatabase() {
JobDatabase database = fixedDataDatabase(DataSet1.FULL_SPECS);
FastJobStorage subject = new FastJobStorage(database);
subject.init();
subject.updateJobAfterRetry("id1", true, 1, 10, "a");
verify(database).updateJobAfterRetry("id1", true, 1, 10, "a");
}
use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by signalapp.
the class FastJobStorageTest method updateJobAfterRetry_memoryOnly_doesNotWriteToDatabase.
@Test
public void updateJobAfterRetry_memoryOnly_doesNotWriteToDatabase() {
JobDatabase database = fixedDataDatabase(DataSetMemory.FULL_SPECS);
FastJobStorage subject = new FastJobStorage(database);
subject.init();
subject.updateJobAfterRetry("id1", true, 1, 10, "a");
verify(database, times(0)).updateJobAfterRetry("id1", true, 1, 10, "a");
}
use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by signalapp.
the class FastJobStorageTest method updateJobs_memoryOnly_doesNotWriteToDatabase.
@Test
public void updateJobs_memoryOnly_doesNotWriteToDatabase() {
JobDatabase database = fixedDataDatabase(DataSetMemory.FULL_SPECS);
FastJobStorage subject = new FastJobStorage(database);
List<JobSpec> jobs = Collections.singletonList(new JobSpec("id1", "f1", null, 1, 1, 1, 1, 1, EMPTY_DATA, null, false, false));
subject.init();
subject.updateJobs(jobs);
verify(database, times(0)).updateJobs(jobs);
}
use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by signalapp.
the class FastJobStorageTest method insertJobs_writesToDatabase.
@Test
public void insertJobs_writesToDatabase() {
JobDatabase database = noopDatabase();
FastJobStorage subject = new FastJobStorage(database);
subject.insertJobs(DataSet1.FULL_SPECS);
verify(database).insertJobs(DataSet1.FULL_SPECS);
}
Aggregations