use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by WhisperSystems.
the class FastJobStorageTest method deleteJobs_writesToDatabase.
@Test
public void deleteJobs_writesToDatabase() {
JobDatabase database = fixedDataDatabase(DataSet1.FULL_SPECS);
FastJobStorage subject = new FastJobStorage(database);
List<String> ids = Arrays.asList("id1", "id2");
subject.init();
subject.deleteJobs(ids);
verify(database).deleteJobs(ids);
}
use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by WhisperSystems.
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);
}
use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by WhisperSystems.
the class FastJobStorageTest method insertJobs_memoryOnlyJob_doesNotWriteToDatabase.
@Test
public void insertJobs_memoryOnlyJob_doesNotWriteToDatabase() {
JobDatabase database = noopDatabase();
FastJobStorage subject = new FastJobStorage(database);
subject.insertJobs(DataSetMemory.FULL_SPECS);
verify(database, times(0)).insertJobs(DataSet1.FULL_SPECS);
}
use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by WhisperSystems.
the class FastJobStorageTest method deleteJobs_memoryOnly_doesNotWriteToDatabase.
@Test
public void deleteJobs_memoryOnly_doesNotWriteToDatabase() {
JobDatabase database = fixedDataDatabase(DataSetMemory.FULL_SPECS);
FastJobStorage subject = new FastJobStorage(database);
List<String> ids = Collections.singletonList("id1");
subject.init();
subject.deleteJobs(ids);
verify(database, times(0)).deleteJobs(ids);
}
use of org.thoughtcrime.securesms.database.JobDatabase in project Signal-Android by signalapp.
the class FastJobStorageTest method updateJobRunningState_writesToDatabase.
@Test
public void updateJobRunningState_writesToDatabase() {
JobDatabase database = fixedDataDatabase(DataSet1.FULL_SPECS);
FastJobStorage subject = new FastJobStorage(database);
subject.init();
subject.updateJobRunningState("id1", true);
verify(database).updateJobRunningState("id1", true);
}
Aggregations