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

Method testAction3

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

Source from the content-addressed store, hash-verified

190 }
191
192 @Test
193 public void testAction3() {
194 final AtomicInteger value = new AtomicInteger();
195 Action3<Integer, Integer, Integer> action = new Action3<Integer, Integer, Integer>() {
196 @Override
197 public void call(Integer t1, Integer t2, Integer t3) {
198 value.set(t1 | t2 | t3);
199 }
200 };
201
202 Async.toAsync(action, Schedulers.immediate())
203 .call(1, 2, 4)
204 .subscribe(new TestObserver<Object>(observer));
205
206 verify(observer, never()).onError(any(Throwable.class));
207 verify(observer, times(1)).onNext(null);
208 verify(observer, times(1)).onCompleted();
209
210 Assert.assertEquals(7, value.get());
211 }
212
213 @Test
214 public void testAction3Error() {

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