MCPcopy Index your code
hub / github.com/ReactiveX/RxJavaAsyncUtil / testAction5

Method testAction5

src/test/java/rx/util/async/AsyncTest.java:270–289  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268 }
269
270 @Test
271 public void testAction5() {
272 final AtomicInteger value = new AtomicInteger();
273 Action5<Integer, Integer, Integer, Integer, Integer> action = new Action5<Integer, Integer, Integer, Integer, Integer>() {
274 @Override
275 public void call(Integer t1, Integer t2, Integer t3, Integer t4, Integer t5) {
276 value.set(t1 | t2 | t3 | t4 | t5);
277 }
278 };
279
280 Async.toAsync(action, Schedulers.immediate())
281 .call(1, 2, 4, 8, 16)
282 .subscribe(new TestObserver<Object>(observer));
283
284 verify(observer, never()).onError(any(Throwable.class));
285 verify(observer, times(1)).onNext(null);
286 verify(observer, times(1)).onCompleted();
287
288 Assert.assertEquals(31, value.get());
289 }
290
291 @Test
292 public void testAction5Error() {

Callers

nothing calls this directly

Calls 5

toAsyncMethod · 0.95
callMethod · 0.45
onErrorMethod · 0.45
onNextMethod · 0.45
onCompletedMethod · 0.45

Tested by

no test coverage detected