Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void combineLatestIterableOneIsNull() {

@Test(expected = NullPointerException.class)
public void combineLatestIterableFunctionReturnsNull() {
Flowable.combineLatestDelayError(Arrays.asList(just1), _ -> null).blockingLast();
Flowable.combineLatestDelayError(Collections.singletonList(just1), _ -> null).blockingLast();
}

@Test(expected = NullPointerException.class)
Expand Down Expand Up @@ -387,7 +387,7 @@ public void flatMapIterableMapperIterableOneNull() {

@Test(expected = NullPointerException.class)
public void flatMapIterableCombinerReturnsNull() {
just1.flatMapIterable((Function<Integer, Iterable<Integer>>) _ -> Arrays.asList(1),
just1.flatMapIterable((Function<Integer, Iterable<Integer>>) _ -> List.of(1),
(_, _) -> null).blockingSubscribe();
}

Expand Down Expand Up @@ -633,7 +633,7 @@ public void zipWithIterableNull() {

@Test(expected = NullPointerException.class)
public void zipWithIterableCombinerReturnsNull() {
just1.zipWith(Arrays.asList(1), (_, _) -> null)
just1.zipWith(List.of(1), (_, _) -> null)
.blockingSubscribe();
}

Expand Down Expand Up @@ -735,7 +735,7 @@ public void serializedSubjectOnErrorNull() {

@Test(expected = NullPointerException.class)
public void combineLatestDelayErrorIterableFunctionReturnsNull() {
Flowable.combineLatestDelayError(Arrays.asList(just1), _ -> null, 128).blockingLast();
Flowable.combineLatestDelayError(Collections.singletonList(just1), _ -> null, 128).blockingLast();
}

@Test(expected = NullPointerException.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ public void subscribeConsumerConsumerWithError() {

Flowable.<Integer>error(new TestException()).subscribe(v -> list.add(v), _ -> list.add(100));

assertEquals(Arrays.asList(100), list);
assertEquals(List.of(100), list);
}

@Test
Expand Down Expand Up @@ -652,7 +652,7 @@ public void subscribeConsumerConsumer() {

Flowable.just(1).subscribe(v -> list.add(v), _ -> list.add(100));

assertEquals(Arrays.asList(1), list);
assertEquals(List.of(1), list);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void onErrorNormal() {

assertEquals(0, composite.size());

assertEquals(Arrays.<Object>asList("OnComplete"), events);
assertEquals(List.<Object>of("OnComplete"), events);

}

Expand Down Expand Up @@ -111,7 +111,7 @@ public void onCompleteNormal() {

assertEquals(0, composite.size());

assertEquals(Arrays.<Object>asList("OnComplete"), events);
assertEquals(List.<Object>of("OnComplete"), events);

}

Expand Down Expand Up @@ -208,7 +208,7 @@ protected void subscribeActual(
}
}.subscribe(this, this, composite);

assertEquals(Arrays.<Object>asList("OnComplete"), events);
assertEquals(List.<Object>of("OnComplete"), events);

TestHelper.assertUndeliverable(errors, 0, IOException.class);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void onSuccessNormal() {

assertEquals(0, composite.size());

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

}

Expand All @@ -101,7 +101,7 @@ public void onErrorNormal() {

assertEquals(0, composite.size());

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

}

Expand Down Expand Up @@ -136,7 +136,7 @@ public void onCompleteNormal() {

assertEquals(0, composite.size());

assertEquals(Arrays.<Object>asList("OnComplete"), events);
assertEquals(List.<Object>of("OnComplete"), events);

}

Expand Down Expand Up @@ -254,7 +254,7 @@ protected void subscribeActual(
}, composite, this, this, this
);

assertEquals(Arrays.<Object>asList("OnComplete"), events);
assertEquals(List.<Object>of("OnComplete"), events);

TestHelper.assertUndeliverable(errors, 0, IOException.class);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ public void onNextNormal() {

assertTrue(composite.size() > 0);

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

processor.onComplete();

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

assertEquals(0, composite.size());
}
Expand All @@ -107,11 +107,11 @@ public void onErrorNormal() {

assertTrue(composite.size() > 0);

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

processor.onComplete();

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

assertEquals(0, composite.size());
}
Expand All @@ -131,7 +131,7 @@ public void onErrorError() {

assertTrue(composite.size() > 0);

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

processor.onError(new IOException());

Expand All @@ -154,7 +154,7 @@ public void onCompleteNormal() {

assertTrue(composite.size() > 0);

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

processor.onComplete();

Expand All @@ -176,7 +176,7 @@ public void onCompleteError() {

assertTrue(composite.size() > 0);

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

processor.onError(new IOException());

Expand Down Expand Up @@ -276,7 +276,7 @@ public void onCompleteCrash() {
processor.onNext(1);
processor.onComplete();

assertEquals(Arrays.asList(1), events);
assertEquals(List.of(1), events);

TestHelper.assertUndeliverable(errors, 0, IOException.class);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void onSuccessNormal() {

assertEquals(0, composite.size());

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

}

Expand All @@ -96,7 +96,7 @@ public void onErrorNormal() {

assertEquals(0, composite.size());

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

}

Expand Down Expand Up @@ -176,7 +176,7 @@ protected void subscribeActual(
}, composite, this, this
);

assertEquals(Arrays.<Object>asList(1), events);
assertEquals(List.<Object>of(1), events);

TestHelper.assertUndeliverable(errors, 0, IOException.class);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public void mergeArrayInnerErrorRace() {

@Test
public void delayErrorIterableCancel() {
Completable.mergeDelayError(Arrays.asList(Completable.complete()))
Completable.mergeDelayError(Collections.singletonList(Completable.complete()))
.test(true)
.assertEmpty();
}
Expand Down
Loading