Search in sources :

Example 6 with PreparedGetNumberOfResults

use of com.pushtorefresh.storio3.sqlite.operations.get.PreparedGetNumberOfResults in project storio by pushtorefresh.

the class GetNumberOfResultsObserveChangesTest method repeatsOperationWithQueryByChangeOfTable.

@Test
public void repeatsOperationWithQueryByChangeOfTable() {
    putUserBlocking();
    PreparedGetNumberOfResults operation = storIOSQLite.get().numberOfResults().withQuery(query).prepare();
    verifyChangesReceived(operation, tableChanges, 1);
}
Also used : PreparedGetNumberOfResults(com.pushtorefresh.storio3.sqlite.operations.get.PreparedGetNumberOfResults) Test(org.junit.Test)

Example 7 with PreparedGetNumberOfResults

use of com.pushtorefresh.storio3.sqlite.operations.get.PreparedGetNumberOfResults in project storio by pushtorefresh.

the class PreparedGetNumberOfResultsTest method getNumberOfResultsSingleExecutesOnSpecifiedScheduler.

@Test
public void getNumberOfResultsSingleExecutesOnSpecifiedScheduler() {
    final GetNumberOfResultsStub getStub = GetNumberOfResultsStub.newInstance();
    final SchedulerChecker schedulerChecker = SchedulerChecker.create(getStub.storIOContentResolver);
    final PreparedGetNumberOfResults operation = getStub.storIOContentResolver.get().numberOfResults().withQuery(getStub.query).withGetResolver(getStub.getResolverForNumberOfResults).prepare();
    schedulerChecker.checkAsSingle(operation);
}
Also used : SchedulerChecker(com.pushtorefresh.storio3.contentresolver.operations.SchedulerChecker) Test(org.junit.Test)

Example 8 with PreparedGetNumberOfResults

use of com.pushtorefresh.storio3.sqlite.operations.get.PreparedGetNumberOfResults in project storio by pushtorefresh.

the class PreparedGetNumberOfResultsTest method getNumberOfResultsSingleExecutesOnSpecifiedScheduler.

@Test
public void getNumberOfResultsSingleExecutesOnSpecifiedScheduler() {
    final GetNumberOfResultsStub getStub = GetNumberOfResultsStub.newInstance();
    final SchedulerChecker schedulerChecker = SchedulerChecker.create(getStub.storIOSQLite);
    final PreparedGetNumberOfResults operation = getStub.storIOSQLite.get().numberOfResults().withQuery(getStub.query).withGetResolver(getStub.getResolverForNumberOfResults).prepare();
    schedulerChecker.checkAsSingle(operation);
}
Also used : SchedulerChecker(com.pushtorefresh.storio3.sqlite.operations.SchedulerChecker) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 PreparedGetNumberOfResults (com.pushtorefresh.storio3.sqlite.operations.get.PreparedGetNumberOfResults)4 SchedulerChecker (com.pushtorefresh.storio3.contentresolver.operations.SchedulerChecker)2 SchedulerChecker (com.pushtorefresh.storio3.sqlite.operations.SchedulerChecker)2