()
| 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() { |
nothing calls this directly
no test coverage detected