use of org.junit.runner.Result in project junit4 by junit-team.
the class CategoriesAndParameterizedTest method runsTestMethodWithCategory.
@Test
public void runsTestMethodWithCategory() {
Result result = new JUnitCore().run(SuiteWithParameterizedTestWithMethodWithCategory.class);
assertEquals(2, result.getRunCount());
assertEquals(0, result.getFailureCount());
}
use of org.junit.runner.Result in project junit4 by junit-team.
the class DisableOnDebugTest method whenRunWithPreJava5DebugArgumentsTestShouldFail.
@Test
public void whenRunWithPreJava5DebugArgumentsTestShouldFail() {
JUnitCore core = new JUnitCore();
Result result = core.run(PreJava5DebugArgumentsTest.class);
assertEquals("Should run the test", 1, result.getRunCount());
assertEquals("Test should not have failed", 0, result.getFailureCount());
}
use of org.junit.runner.Result in project junit4 by junit-team.
the class DisableOnDebugTest method whenRunWithPostJava5DebugArgumentsTestShouldFail.
@Test
public void whenRunWithPostJava5DebugArgumentsTestShouldFail() {
JUnitCore core = new JUnitCore();
Result result = core.run(PostJava5DebugArgumentsTest.class);
assertEquals("Should run the test", 1, result.getRunCount());
assertEquals("Test should not have failed", 0, result.getFailureCount());
}
use of org.junit.runner.Result in project junit4 by junit-team.
the class DisableOnDebugTest method whenRunWithoutDebugFlagsTestShouldPass.
@Test
public void whenRunWithoutDebugFlagsTestShouldPass() {
JUnitCore core = new JUnitCore();
Result result = core.run(WithoutDebugArgumentsTest.class);
assertEquals("Should run the test", 1, result.getRunCount());
assertEquals("Test should have failed", 1, result.getFailureCount());
}
use of org.junit.runner.Result in project junit4 by junit-team.
the class DisableOnDebugTest method whenRunWithPreJava5DebugArgumentsInReverseOrderTestShouldFail.
@Test
public void whenRunWithPreJava5DebugArgumentsInReverseOrderTestShouldFail() {
JUnitCore core = new JUnitCore();
Result result = core.run(PreJava5DebugArgumentsReversedTest.class);
assertEquals("Should run the test", 1, result.getRunCount());
assertEquals("Test should not have failed", 0, result.getFailureCount());
}
Aggregations