Skip to content

Commit acc5c1e

Browse files
TestSubscriber.assertNoErrors
1 parent d06c7d6 commit acc5c1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rxjava-core/src/main/java/rx/observers/TestSubscriber.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ public void assertUnsubscribed() {
150150
}
151151
}
152152

153+
public void assertNoErrors() {
154+
if (getOnErrorEvents().size() > 0) {
155+
throw new AssertionError("Unexpected onError events: " + getOnErrorEvents().size(), getOnErrorEvents().get(0));
156+
}
157+
}
158+
153159
/**
154160
* @warn javadoc missing
155161
*/

0 commit comments

Comments
 (0)