()
| 112 | } |
| 113 | |
| 114 | @Test |
| 115 | public void testAction1() { |
| 116 | final AtomicInteger value = new AtomicInteger(); |
| 117 | Action1<Integer> action = new Action1<Integer>() { |
| 118 | @Override |
| 119 | public void call(Integer t1) { |
| 120 | value.set(t1); |
| 121 | } |
| 122 | }; |
| 123 | |
| 124 | Async.toAsync(action, Schedulers.immediate()) |
| 125 | .call(1) |
| 126 | .subscribe(new TestObserver<Object>(observer)); |
| 127 | |
| 128 | verify(observer, never()).onError(any(Throwable.class)); |
| 129 | verify(observer, times(1)).onNext(null); |
| 130 | verify(observer, times(1)).onCompleted(); |
| 131 | |
| 132 | Assert.assertEquals(1, value.get()); |
| 133 | } |
| 134 | |
| 135 | @Test |
| 136 | public void testAction1Error() { |
nothing calls this directly
no test coverage detected