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

Method testAction4

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

Source from the content-addressed store, hash-verified

229 }
230
231 @Test
232 public void testAction4() {
233 final AtomicInteger value = new AtomicInteger();
234 Action4<Integer, Integer, Integer, Integer> action = new Action4<Integer, Integer, Integer, Integer>() {
235 @Override
236 public void call(Integer t1, Integer t2, Integer t3, Integer t4) {
237 value.set(t1 | t2 | t3 | t4);
238 }
239 };
240
241 Async.toAsync(action, Schedulers.immediate())
242 .call(1, 2, 4, 8)
243 .subscribe(new TestObserver<Object>(observer));
244
245 verify(observer, never()).onError(any(Throwable.class));
246 verify(observer, times(1)).onNext(null);
247 verify(observer, times(1)).onCompleted();
248
249 Assert.assertEquals(15, value.get());
250 }
251
252 @Test
253 public void testAction4Error() {

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