コード例 #1
0
    @Test
    public void shouldPutObjectsWithTypeMappingWithTransactionAsCompletable() {
      final PutObjectsStub putStub =
          PutObjectsStub.newPutStubForMultipleObjectsWithTypeMappingWithTransaction();

      final Completable completable =
          putStub
              .storIOSQLite
              .put()
              .objects(putStub.items)
              .useTransaction(true)
              .prepare()
              .asRxCompletable();

      putStub.verifyBehaviorForMultipleObjects(completable);
    }
コード例 #2
0
    @Test
    public void shouldPutObjectsWithTypeMappingWithoutTransactionAsObservable() {
      final PutObjectsStub putStub =
          PutObjectsStub.newPutStubForMultipleObjectsWithTypeMappingWithoutTransaction();

      final Observable<PutResults<TestItem>> observable =
          putStub
              .storIOSQLite
              .put()
              .objects(putStub.items)
              .useTransaction(false)
              .prepare()
              .asRxObservable();

      putStub.verifyBehaviorForMultipleObjects(observable);
    }
コード例 #3
0
    @Test
    public void shouldPutObjectsWithTypeMappingWithTransactionAsSingle() {
      final PutObjectsStub putStub =
          PutObjectsStub.newPutStubForMultipleObjectsWithTypeMappingWithTransaction();

      final Single<PutResults<TestItem>> single =
          putStub
              .storIOSQLite
              .put()
              .objects(putStub.items)
              .useTransaction(true)
              .prepare()
              .asRxSingle();

      putStub.verifyBehaviorForMultipleObjects(single);
    }
コード例 #4
0
    @Test
    public void shouldPutObjectsWithTypeMappingWithTransactionBlocking() {
      final PutObjectsStub putStub =
          PutObjectsStub.newPutStubForMultipleObjectsWithTypeMappingWithTransaction();

      final PutResults<TestItem> putResults =
          putStub
              .storIOSQLite
              .put()
              .objects(putStub.items)
              .useTransaction(true)
              .prepare()
              .executeAsBlocking();

      putStub.verifyBehaviorForMultipleObjects(putResults);
    }