use of org.junit.internal.runners.model.EachTestNotifier in project cucumber-jvm by cucumber.
the class JUnitReporterTest method result_without_error_strict.
@Test
public void result_without_error_strict() {
createStrictReporter();
Result result = mock(Result.class);
EachTestNotifier stepNotifier = mock(EachTestNotifier.class);
jUnitReporter.stepNotifier = stepNotifier;
jUnitReporter.result(result);
verify(stepNotifier).fireTestStarted();
verify(stepNotifier).fireTestFinished();
verify(stepNotifier, times(0)).addFailure(Matchers.<Throwable>any(Throwable.class));
verify(stepNotifier, times(0)).fireTestIgnored();
}
use of org.junit.internal.runners.model.EachTestNotifier in project cucumber-jvm by cucumber.
the class JUnitReporterTest method result_with_undefined_step_non_strict.
@Test
public void result_with_undefined_step_non_strict() {
createNonStrictReporter();
EachTestNotifier stepNotifier = mock(EachTestNotifier.class);
jUnitReporter.stepNotifier = stepNotifier;
jUnitReporter.result(Result.UNDEFINED);
verify(stepNotifier, times(0)).fireTestStarted();
verify(stepNotifier, times(0)).fireTestFinished();
verify(stepNotifier, times(0)).addFailure(Matchers.<Throwable>any(Throwable.class));
verify(stepNotifier).fireTestIgnored();
}
use of org.junit.internal.runners.model.EachTestNotifier in project cucumber-jvm by cucumber.
the class JUnitReporterTest method result_with_undefined_step_strict.
@Test
public void result_with_undefined_step_strict() {
createStrictReporter();
createDefaultRunNotifier();
EachTestNotifier stepNotifier = mock(EachTestNotifier.class);
jUnitReporter.stepNotifier = stepNotifier;
EachTestNotifier executionUnitNotifier = mock(EachTestNotifier.class);
jUnitReporter.executionUnitNotifier = executionUnitNotifier;
jUnitReporter.result(Result.UNDEFINED);
verify(stepNotifier, times(1)).fireTestStarted();
verify(stepNotifier, times(1)).fireTestFinished();
verifyAddFailureWithPendingException(stepNotifier);
verifyAddFailureWithPendingException(executionUnitNotifier);
verify(stepNotifier, times(0)).fireTestIgnored();
}
use of org.junit.internal.runners.model.EachTestNotifier in project cucumber-jvm by cucumber.
the class JUnitReporterTest method result_without_error_non_strict.
@Test
public void result_without_error_non_strict() {
createNonStrictReporter();
Result result = mock(Result.class);
EachTestNotifier stepNotifier = mock(EachTestNotifier.class);
jUnitReporter.stepNotifier = stepNotifier;
jUnitReporter.result(result);
verify(stepNotifier).fireTestStarted();
verify(stepNotifier).fireTestFinished();
verify(stepNotifier, times(0)).addFailure(Matchers.<Throwable>any(Throwable.class));
verify(stepNotifier, times(0)).fireTestIgnored();
}
use of org.junit.internal.runners.model.EachTestNotifier in project Ebselen by Ardesco.
the class SeleniumJUnitRunner method runChild.
@Override
protected void runChild(FrameworkMethod method, RunNotifier notifier) {
EachTestNotifier eachNotifier = makeNotifier(method, notifier);
TestData seleniumTestData = new TestData();
seleniumTestData.setTestName(method.getName());
long startTime = System.currentTimeMillis();
if (method.getAnnotation(Ignore.class) != null) {
runIgnored(eachNotifier);
} else {
seleniumTestData.addFailure(runNotIgnored(method, eachNotifier));
}
seleniumTestData.setTimeTaken(System.currentTimeMillis() - startTime);
logger.info("Test {} run in {}", method.getName(), seleniumTestData.getTimeTaken());
reportData.addTestData(method.getAnnotation(SeleniumTestAnnotations.Order.class).value(), seleniumTestData);
}
Aggregations