use of org.junit.runner.notification.Failure in project spring-boot by spring-projects.
the class Mockito110Tests method runTests.
private void runTests(Class<?> testClass) {
Result result = new JUnitCore().run(testClass);
for (Failure failure : result.getFailures()) {
System.err.println(failure.getTrace());
}
assertThat(result.getFailureCount()).isEqualTo(0);
assertThat(result.getRunCount()).isGreaterThan(0);
}
use of org.junit.runner.notification.Failure in project spring-boot by spring-projects.
the class Mockito21Tests method runTests.
private void runTests(Class<?> testClass) {
Result result = new JUnitCore().run(testClass);
for (Failure failure : result.getFailures()) {
System.err.println(failure.getTrace());
}
assertThat(result.getFailureCount()).isEqualTo(0);
assertThat(result.getRunCount()).isGreaterThan(0);
}
use of org.junit.runner.notification.Failure in project spring-boot by spring-projects.
the class Mockito22Tests method runTests.
private void runTests(Class<?> testClass) {
Result result = new JUnitCore().run(testClass);
for (Failure failure : result.getFailures()) {
System.err.println(failure.getTrace());
}
assertThat(result.getFailureCount()).isEqualTo(0);
assertThat(result.getRunCount()).isGreaterThan(0);
}
use of org.junit.runner.notification.Failure in project spring-boot by spring-projects.
the class Mockito25Tests method runTests.
private void runTests(Class<?> testClass) {
Result result = new JUnitCore().run(testClass);
for (Failure failure : result.getFailures()) {
System.err.println(failure.getTrace());
}
assertThat(result.getFailureCount()).isEqualTo(0);
assertThat(result.getRunCount()).isGreaterThan(0);
}
use of org.junit.runner.notification.Failure in project lombok by rzwitserloot.
the class DirectoryRunner method run.
@Override
public void run(RunNotifier notifier) {
if (failure != null) {
reportInitializationFailure(notifier, description, failure);
return;
}
for (Map.Entry<String, Description> entry : tests.entrySet()) {
Description testDescription = entry.getValue();
FileTester tester;
try {
tester = createTester(entry.getKey());
} catch (IOException e) {
reportInitializationFailure(notifier, testDescription, e);
continue;
}
if (tester == null) {
notifier.fireTestIgnored(testDescription);
continue;
}
notifier.fireTestStarted(testDescription);
try {
tester.runTest();
} catch (Throwable t) {
notifier.fireTestFailure(new Failure(testDescription, t));
}
notifier.fireTestFinished(testDescription);
}
}
Aggregations