Skip to content

Commit e0d793f

Browse files
committed
Use test() helpers
1 parent 5c3bdf3 commit e0d793f

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

src/test/java/io/reactivex/completable/CompletableTest.java

+20-22
Original file line numberDiff line numberDiff line change
@@ -2783,32 +2783,30 @@ public void timeoutOtherNull() {
27832783

27842784
@Test(timeout = 5000)
27852785
public void toNormal() {
2786-
Flowable<Object> flow = normal.completable.to(new Function<Completable, Flowable<Object>>() {
2787-
@Override
2788-
public Flowable<Object> apply(Completable c) {
2789-
return c.toFlowable();
2790-
}
2791-
});
2792-
2793-
flow.blockingForEach(new Consumer<Object>() {
2794-
@Override
2795-
public void accept(Object e) { }
2796-
});
2786+
normal.completable
2787+
.to(new Function<Completable, Flowable<Object>>() {
2788+
@Override
2789+
public Flowable<Object> apply(Completable c) {
2790+
return c.toFlowable();
2791+
}
2792+
})
2793+
.test()
2794+
.assertComplete()
2795+
.assertNoValues();
27972796
}
27982797

27992798
@Test(timeout = 5000)
28002799
public void asNormal() {
2801-
Flowable<Object> flow = normal.completable.as(new CompletableConverter<Flowable<Object>>() {
2802-
@Override
2803-
public Flowable<Object> apply(Completable c) {
2804-
return c.toFlowable();
2805-
}
2806-
});
2807-
2808-
flow.blockingForEach(new Consumer<Object>() {
2809-
@Override
2810-
public void accept(Object e) { }
2811-
});
2800+
normal.completable
2801+
.as(new CompletableConverter<Flowable<Object>>() {
2802+
@Override
2803+
public Flowable<Object> apply(Completable c) {
2804+
return c.toFlowable();
2805+
}
2806+
})
2807+
.test()
2808+
.assertComplete()
2809+
.assertNoValues();
28122810
}
28132811

28142812
@Test

0 commit comments

Comments
 (0)