Search in sources :

Example 1 with PreparedGetNumberOfResults

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

the class PreparedGetNumberOfResultsTest method getNumberOfResultsFlowableExecutesOnSpecifiedScheduler.

@Test
public void getNumberOfResultsFlowableExecutesOnSpecifiedScheduler() {
    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.checkAsFlowable(operation);
}
Also used : SchedulerChecker(com.pushtorefresh.storio3.contentresolver.operations.SchedulerChecker) Test(org.junit.Test)

Example 2 with PreparedGetNumberOfResults

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

the class PreparedGetNumberOfResultsTest method getNumberOfResultsFlowableExecutesOnSpecifiedScheduler.

@Test
public void getNumberOfResultsFlowableExecutesOnSpecifiedScheduler() {
    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.checkAsFlowable(operation);
}
Also used : SchedulerChecker(com.pushtorefresh.storio3.sqlite.operations.SchedulerChecker) Test(org.junit.Test)

Example 3 with PreparedGetNumberOfResults

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

the class GetNumberOfResultsObserveChangesTest method repeatsOperationWithQueryByChangeOfTag.

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

Example 4 with PreparedGetNumberOfResults

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

the class GetNumberOfResultsObserveChangesTest method repeatsOperationWithRawQueryByChangeOfTag.

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

Example 5 with PreparedGetNumberOfResults

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

the class GetNumberOfResultsObserveChangesTest method repeatsOperationWithRawQueryByChangeOfTable.

@Test
public void repeatsOperationWithRawQueryByChangeOfTable() {
    putUserBlocking();
    PreparedGetNumberOfResults operation = storIOSQLite.get().numberOfResults().withQuery(rawQuery).prepare();
    verifyChangesReceived(operation, tableChanges, 1);
}
Also used : PreparedGetNumberOfResults(com.pushtorefresh.storio3.sqlite.operations.get.PreparedGetNumberOfResults) 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