Search in sources :

Example 21 with Completable

use of rx.Completable in project storio by pushtorefresh.

the class PutOperationDesignTest method putContentValuesCompletable.

@Test
public void putContentValuesCompletable() {
    ContentValues contentValues = mock(ContentValues.class);
    Completable completable = storIOContentResolver().put().contentValues(contentValues).withPutResolver(putResolverForContentValues).prepare().asRxCompletable();
}
Also used : ContentValues(android.content.ContentValues) Completable(rx.Completable) Test(org.junit.Test)

Example 22 with Completable

use of rx.Completable in project storio by pushtorefresh.

the class PutOperationDesignTest method putContentValuesIterableCompletable.

@Test
public void putContentValuesIterableCompletable() {
    List<ContentValues> contentValuesList = new ArrayList<ContentValues>();
    Completable completable = storIOContentResolver().put().contentValues(contentValuesList).withPutResolver(putResolverForContentValues).prepare().asRxCompletable();
}
Also used : ContentValues(android.content.ContentValues) Completable(rx.Completable) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 23 with Completable

use of rx.Completable in project storio by pushtorefresh.

the class PreparedPutContentValuesIterableTest method putContentValuesIterableCompletable.

@Test
public void putContentValuesIterableCompletable() {
    final PutContentValuesStub putStub = PutContentValuesStub.newPutStubForMultipleContentValues();
    final Completable completable = putStub.storIOContentResolver.put().contentValues(putStub.contentValues).withPutResolver(putStub.putResolver).prepare().asRxCompletable();
    putStub.verifyBehaviorForMultipleContentValues(completable);
}
Also used : Completable(rx.Completable) Test(org.junit.Test)

Example 24 with Completable

use of rx.Completable in project storio by pushtorefresh.

the class PreparedPutContentValuesTest method putContentValuesCompletable.

@Test
public void putContentValuesCompletable() {
    final PutContentValuesStub putStub = PutContentValuesStub.newPutStubForOneContentValues();
    final Completable completable = putStub.storIOContentResolver.put().contentValues(putStub.contentValues.get(0)).withPutResolver(putStub.putResolver).prepare().asRxCompletable();
    putStub.verifyBehaviorForOneContentValues(completable);
}
Also used : Completable(rx.Completable) Test(org.junit.Test)

Example 25 with Completable

use of rx.Completable in project storio by pushtorefresh.

the class DeleteOperationDesignTest method deleteObjectCompletable.

@Test
public void deleteObjectCompletable() {
    User user = newUser();
    Completable completableDelete = storIOSQLite().delete().object(user).withDeleteResolver(UserTableMeta.DELETE_RESOLVER).prepare().asRxCompletable();
}
Also used : Completable(rx.Completable) Test(org.junit.Test)

Aggregations

Completable (rx.Completable)31 Test (org.junit.Test)24 ArrayList (java.util.ArrayList)6 TestSubscriber (rx.observers.TestSubscriber)6 MockResponse (okhttp3.mockwebserver.MockResponse)4 Func1 (rx.functions.Func1)4 ContentValues (android.content.ContentValues)3 Action0 (rx.functions.Action0)3 CheckResult (android.support.annotation.CheckResult)2 NonNull (android.support.annotation.NonNull)2 PreparedWriteOperation (com.pushtorefresh.storio.operations.PreparedWriteOperation)2 OnSubscribeExecuteAsBlockingCompletable (com.pushtorefresh.storio.operations.internal.OnSubscribeExecuteAsBlockingCompletable)2 CloudException (com.microsoft.azure.CloudException)1 Network (com.microsoft.azure.management.network.Network)1 NetworkInterface (com.microsoft.azure.management.network.NetworkInterface)1 ResourceGroup (com.microsoft.azure.management.resources.ResourceGroup)1 Region (com.microsoft.azure.management.resources.fluentcore.arm.Region)1 Resource (com.microsoft.azure.management.resources.fluentcore.arm.models.Resource)1 Creatable (com.microsoft.azure.management.resources.fluentcore.model.Creatable)1 Indexable (com.microsoft.azure.management.resources.fluentcore.model.Indexable)1