Search in sources :

Example 1 with Result

use of com.nytimes.android.external.store.util.Result in project Store by NYTimes.

the class SequentialTest method parallelWithResult.

@Test
public void parallelWithResult() {
    BarCode b = new BarCode("one", "two");
    Single<Result<Integer>> first = store.getWithResult(b);
    Single<Result<Integer>> second = store.getWithResult(b);
    first.test().awaitTerminalEvent();
    second.test().awaitTerminalEvent();
    assertThat(networkCalls).isEqualTo(1);
}
Also used : BarCode(com.nytimes.android.external.store3.base.impl.BarCode) Result(com.nytimes.android.external.store.util.Result) Test(org.junit.Test)

Aggregations

Result (com.nytimes.android.external.store.util.Result)1 BarCode (com.nytimes.android.external.store3.base.impl.BarCode)1 Test (org.junit.Test)1