Skip to content

Removes superfluous creation of processors for SubscriberWhiteboxVerific... #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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 @@ -344,7 +344,7 @@ public void untested_spec213_failingOnSignalInvocation() throws Exception {
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.13
@Override @Test
public void required_spec213_onSubscribe_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable {
subscriberTest(new TestStageTestRun() {
subscriberTestWithoutSetup(new TestStageTestRun() {
@Override
public void run(WhiteboxTestStage stage) throws Throwable {

Expand All @@ -365,13 +365,18 @@ public void run(WhiteboxTestStage stage) throws Throwable {
}// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.13
@Override @Test
public void required_spec213_onNext_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable {
subscriberTest(new TestStageTestRun() {
subscriberTestWithoutSetup(new TestStageTestRun() {
@Override
public void run(WhiteboxTestStage stage) throws Throwable {

final Subscription subscription = new Subscription() {
@Override public void request(final long elements) {}
@Override public void cancel() {}
@Override
public void request(final long elements) {
}

@Override
public void cancel() {
}
};

{
Expand All @@ -380,7 +385,7 @@ public void run(WhiteboxTestStage stage) throws Throwable {
sub.onSubscribe(subscription);
try {
sub.onNext(null);
} catch(final NullPointerException expected) {
} catch (final NullPointerException expected) {
gotNPE = true;
}
assertTrue(gotNPE, "onNext(null) did not throw NullPointerException");
Expand All @@ -394,13 +399,18 @@ public void run(WhiteboxTestStage stage) throws Throwable {
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.13
@Override @Test
public void required_spec213_onError_mustThrowNullPointerExceptionWhenParametersAreNull() throws Throwable {
subscriberTest(new TestStageTestRun() {
subscriberTestWithoutSetup(new TestStageTestRun() {
@Override
public void run(WhiteboxTestStage stage) throws Throwable {

final Subscription subscription = new Subscription() {
@Override public void request(final long elements) {}
@Override public void cancel() {}
@Override
public void request(final long elements) {
}

@Override
public void cancel() {
}
};

{
Expand All @@ -409,7 +419,7 @@ public void run(WhiteboxTestStage stage) throws Throwable {
sub.onSubscribe(subscription);
try {
sub.onError(null);
} catch(final NullPointerException expected) {
} catch (final NullPointerException expected) {
gotNPE = true;
}
assertTrue(gotNPE, "onError(null) did not throw NullPointerException");
Expand Down