Search in sources :

Example 31 with Completable

use of rx.Completable in project feign by OpenFeign.

the class HystrixBuilderTest method rxCompletableEmptyBody.

@Test
public void rxCompletableEmptyBody() {
    server.enqueue(new MockResponse());
    TestInterface api = target();
    Completable completable = api.completable();
    assertThat(completable).isNotNull();
    assertThat(server.getRequestCount()).isEqualTo(0);
    TestSubscriber<String> testSubscriber = new TestSubscriber<String>();
    completable.subscribe(testSubscriber);
    testSubscriber.awaitTerminalEvent();
    testSubscriber.assertCompleted();
    testSubscriber.assertNoErrors();
}
Also used : MockResponse(okhttp3.mockwebserver.MockResponse) Completable(rx.Completable) TestSubscriber(rx.observers.TestSubscriber) 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