Skip to content

Commit

Permalink
ErrorCollector-Beispiel
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Oct 10, 2011
1 parent 5f3e4cb commit 54e82f3
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"));
}
}

0 comments on commit 54e82f3

Please sign in to comment.