use of org.junit.runner.JUnitCore in project jna by java-native-access.
the class GDI32UtilTest method main.
public static void main(String[] args) {
JUnitCore jUnitCore = new JUnitCore();
jUnitCore.run(GDI32UtilTest.class);
}
use of org.junit.runner.JUnitCore in project junit4 by junit-team.
the class AnnotationTest method testRunAllAfterClassesRegardless.
public void testRunAllAfterClassesRegardless() {
log = "";
JUnitCore core = new JUnitCore();
Result result = core.run(RunAllAfterClassesRegardless.class);
assertTrue(log.contains("one"));
assertTrue(log.contains("two"));
assertEquals(2, result.getFailureCount());
}
use of org.junit.runner.JUnitCore in project junit4 by junit-team.
the class ExpectedTest method expected.
@Test
public void expected() {
JUnitCore core = new JUnitCore();
Result result = core.run(Expected.class);
assertTrue(result.wasSuccessful());
}
use of org.junit.runner.JUnitCore in project junit4 by junit-team.
the class TimeoutTest method runAndTime.
private long runAndTime(Class<?> clazz) {
JUnitCore core = new JUnitCore();
long startTime = System.currentTimeMillis();
core.run(clazz);
long totalTime = System.currentTimeMillis() - startTime;
return totalTime;
}
use of org.junit.runner.JUnitCore in project junit4 by junit-team.
the class TimeoutTest method successWithTimeout.
@Test
public void successWithTimeout() throws Exception {
JUnitCore core = new JUnitCore();
Result result = core.run(SuccessWithTimeoutTest.class);
assertEquals(1, result.getRunCount());
assertEquals(0, result.getFailureCount());
}
Aggregations