Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ErrorCollector-Beispiel

  • Loading branch information...
commit 54e82f3e85a94507a920272e61f9d49b5b3f696a 1 parent 5f3e4cb
@marcphilipp authored
View
19 junit-rules/src/test/java/org/junit/rules/verifier/ErrorCollectingTest.java
@@ -0,0 +1,19 @@
+package org.junit.rules.verifier;
+
+import static org.hamcrest.CoreMatchers.is;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+
+public class ErrorCollectingTest {
+
+ @Rule
+ public ErrorCollector collector = new ErrorCollector();
+
+ @Test
+ public void test() {
+ collector.checkThat(1 + 1, is(3));
+ collector.addError(new Exception("something went wrong"));
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.