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