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

Method testAction2

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

Source from the content-addressed store, hash-verified

151 }
152
153 @Test
154 public void testAction2() {
155 final AtomicInteger value = new AtomicInteger();
156 Action2<Integer, Integer> action = new Action2<Integer, Integer>() {
157 @Override
158 public void call(Integer t1, Integer t2) {
159 value.set(t1 | t2);
160 }
161 };
162
163 Async.toAsync(action, Schedulers.immediate())
164 .call(1, 2)
165 .subscribe(new TestObserver<Object>(observer));
166
167 verify(observer, never()).onError(any(Throwable.class));
168 verify(observer, times(1)).onNext(null);
169 verify(observer, times(1)).onCompleted();
170
171 Assert.assertEquals(3, value.get());
172 }
173
174 @Test
175 public void testAction2Error() {

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