Skip to content

Commit 9fec1c7

Browse files
slisaasquatchakarnokd
authored andcommitted
Deleted unnecessary NPE tests (#6846)
* Deleted unnecessary NPE tests * Deleted unnecessary NPE tests
1 parent 336ecb8 commit 9fec1c7

File tree

51 files changed

+89
-4086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+89
-4086
lines changed

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

Lines changed: 0 additions & 394 deletions
Large diffs are not rendered by default.

src/test/java/io/reactivex/rxjava3/flowable/FlowableNullTests.java

Lines changed: 82 additions & 1478 deletions
Large diffs are not rendered by default.

src/test/java/io/reactivex/rxjava3/flowable/FlowableTests.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -999,13 +999,6 @@ public void emptyIsEmpty() {
999999
verify(w, never()).onError(any(Throwable.class));
10001000
}
10011001

1002-
@Test(expected = NullPointerException.class)
1003-
public void forEachWithNull() {
1004-
Flowable.error(new Exception("boo"))
1005-
//
1006-
.forEach(null);
1007-
}
1008-
10091002
@Test
10101003
public void extend() {
10111004
final TestSubscriber<Object> subscriber = new TestSubscriber<>();

src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableAndThenCompletableabTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@
2828
import io.reactivex.rxjava3.testsupport.TestHelper;
2929

3030
public class CompletableAndThenCompletableabTest extends RxJavaTest {
31-
@Test(expected = NullPointerException.class)
32-
public void andThenCompletableCompleteNull() {
33-
Completable.complete()
34-
.andThen((Completable) null);
35-
}
36-
3731
@Test
3832
public void andThenCompletableCompleteComplete() {
3933
Completable.complete()

src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableAndThenTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@
1919
import io.reactivex.rxjava3.testsupport.TestHelper;
2020

2121
public class CompletableAndThenTest extends RxJavaTest {
22-
@Test(expected = NullPointerException.class)
23-
public void andThenMaybeNull() {
24-
Completable.complete()
25-
.andThen((Maybe<Object>) null);
26-
}
27-
2822
@Test
2923
public void andThenMaybeCompleteValue() {
3024
Completable.complete()

src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableCreateTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929

3030
public class CompletableCreateTest extends RxJavaTest {
3131

32-
@Test(expected = NullPointerException.class)
33-
public void nullArgument() {
34-
Completable.create(null);
35-
}
36-
3732
@Test
3833
public void basic() {
3934
List<Throwable> errors = TestHelper.trackPluginErrors();

src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableDoFinallyTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ public Completable apply(Completable f) throws Exception {
6565
});
6666
}
6767

68-
@Test(expected = NullPointerException.class)
69-
public void nullAction() {
70-
Completable.complete().doFinally(null);
71-
}
72-
7368
@Test
7469
public void actionThrows() {
7570
List<Throwable> errors = TestHelper.trackPluginErrors();

src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableFromActionTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@
2424
import io.reactivex.rxjava3.functions.Action;
2525

2626
public class CompletableFromActionTest extends RxJavaTest {
27-
@Test(expected = NullPointerException.class)
28-
public void fromActionNull() {
29-
Completable.fromAction(null);
30-
}
31-
3227
@Test
3328
public void fromAction() {
3429
final AtomicInteger atomicInteger = new AtomicInteger();

src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableFromCallableTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@
3232
import io.reactivex.rxjava3.testsupport.TestHelper;
3333

3434
public class CompletableFromCallableTest extends RxJavaTest {
35-
@Test(expected = NullPointerException.class)
36-
public void fromCallableNull() {
37-
Completable.fromCallable(null);
38-
}
39-
4035
@Test
4136
public void fromCallable() {
4237
final AtomicInteger atomicInteger = new AtomicInteger();

src/test/java/io/reactivex/rxjava3/internal/operators/completable/CompletableFromMaybeTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
import io.reactivex.rxjava3.core.*;
1919

2020
public class CompletableFromMaybeTest extends RxJavaTest {
21-
@Test(expected = NullPointerException.class)
22-
public void fromMaybeNull() {
23-
Completable.fromMaybe(null);
24-
}
25-
2621
@Test
2722
public void fromMaybe() {
2823
Completable.fromMaybe(Maybe.just(1))

0 commit comments

Comments
 (0)