use of org.junit.tests.TestSystem in project junit4 by junit-team.
the class JUnitCoreTest method shouldAddFailuresToResult.
@Test
public void shouldAddFailuresToResult() {
JUnitCore jUnitCore = new JUnitCore();
Result result = jUnitCore.runMain(new TestSystem(), "NonExistentTest");
assertThat(result.getFailureCount(), is(1));
assertThat(result.getFailures().get(0).getException(), instanceOf(IllegalArgumentException.class));
}
use of org.junit.tests.TestSystem in project junit4 by junit-team.
the class TextListenerTest method setUp.
@Override
public void setUp() {
runner = new JUnitCore();
TestSystem system = new TestSystem();
results = system.outContents();
runner.addListener(new TextListener(system));
}
Aggregations