X Tutup
Skip to content

Commit 9bc2280

Browse files
committed
3.4 ambWith better style
1 parent 5c2ed42 commit 9bc2280

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/java/itrx/chapter3/combining/AmbTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public void exampleAmb() {
2323

2424
public void exampleAmbWith() {
2525
Observable.timer(100, TimeUnit.MILLISECONDS).map(i -> "First")
26-
.ambWith(Observable.timer(50, TimeUnit.MILLISECONDS).map(i -> "Second"))
27-
.ambWith(Observable.timer(70, TimeUnit.MILLISECONDS).map(i -> "Third"))
26+
.ambWith(Observable.timer(50, TimeUnit.MILLISECONDS).map(i -> "Second"))
27+
.ambWith(Observable.timer(70, TimeUnit.MILLISECONDS).map(i -> "Third"))
2828
.subscribe(System.out::println);
2929

3030
// Second
@@ -57,8 +57,8 @@ public void testAmbWith() {
5757
TestScheduler scheduler = Schedulers.test();
5858

5959
Observable.timer(100, TimeUnit.MILLISECONDS, scheduler).map(i -> "First")
60-
.ambWith(Observable.timer(50, TimeUnit.MILLISECONDS, scheduler).map(i -> "Second"))
61-
.ambWith(Observable.timer(70, TimeUnit.MILLISECONDS, scheduler).map(i -> "Third"))
60+
.ambWith(Observable.timer(50, TimeUnit.MILLISECONDS, scheduler).map(i -> "Second"))
61+
.ambWith(Observable.timer(70, TimeUnit.MILLISECONDS, scheduler).map(i -> "Third"))
6262
.subscribe(tester);
6363

6464
scheduler.advanceTimeBy(100, TimeUnit.MILLISECONDS);

0 commit comments

Comments
 (0)
X Tutup