Skip to content
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

fix #212 issue on spec 213 testing wrt Processor #222

Merged
merged 1 commit into from
Feb 16, 2015
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ subprojects {
apply plugin: "osgi"

group = "org.reactivestreams"
version = "1.0.0.RC2"
version = "1.0.0.RC3.BUILD-SNAPSHOT"

sourceCompatibility = 1.6
targetCompatibility = 1.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,11 @@ public void required_spec213_onSubscribe_mustThrowNullPointerExceptionWhenParame
public void run(WhiteboxTestStage stage) throws Throwable {

{
final Subscriber<T> sub = createSubscriber(stage.probe());
final Subscriber<? super T> sub = stage.sub();
boolean gotNPE = false;
try {
sub.onSubscribe(null);
} catch(final NullPointerException expected) {
} catch (final NullPointerException expected) {
gotNPE = true;
}
assertTrue(gotNPE, "onSubscribe(null) did not throw NullPointerException");
Expand All @@ -370,17 +370,22 @@ public void required_spec213_onNext_mustThrowNullPointerExceptionWhenParametersA
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() {
}
};

{
final Subscriber<T> sub = createSubscriber(stage.probe());
final Subscriber<? super T> sub = stage.sub();
boolean gotNPE = false;
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 @@ -390,7 +395,7 @@ 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 {
Expand All @@ -399,17 +404,22 @@ public void required_spec213_onError_mustThrowNullPointerExceptionWhenParameters
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() {
}
};

{
final Subscriber<T> sub = createSubscriber(stage.probe());
final Subscriber<? super T> sub = stage.sub();
boolean gotNPE = false;
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