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

Method testAction0

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

Source from the content-addressed store, hash-verified

73 }
74
75 @Test
76 public void testAction0() {
77 final AtomicInteger value = new AtomicInteger();
78 Action0 action = new Action0() {
79 @Override
80 public void call() {
81 value.incrementAndGet();
82 }
83 };
84
85 Async.toAsync(action, Schedulers.immediate())
86 .call()
87 .subscribe(new TestObserver<Object>(observer));
88
89 verify(observer, never()).onError(any(Throwable.class));
90 verify(observer, times(1)).onNext(null);
91 verify(observer, times(1)).onCompleted();
92
93 Assert.assertEquals(1, value.get());
94 }
95
96 @Test
97 public void testAction0Error() {

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