Refine search
protected void addFailure(Throwable e) { notifier.fireTestFailure(new Failure(description, e)); } }
protected void addFailure(Throwable targetException) { notifier.fireTestFailure(new Failure(description, targetException)); }
protected void addFailure(Throwable e) { fNotifier.fireTestFailure(new Failure(fDescription, e)); } }
protected void addFailure(Throwable targetException) { fNotifier.fireTestFailure(new Failure(fDescription, targetException)); }
@Override public void run() { try { javaTestMethod.invoke(testInstance, javaMethodArgs); } catch (Exception ex) { notifier.fireTestFailure(new Failure(describeChild(method), ex)); } finally { submitted.decrementAndGet(); } } });
@Override public void run() { try { javaTestMethod.invoke(testInstance, javaMethodArgs); } catch (IllegalAccessException ex) { notifier.fireTestFailure(new Failure(describeChild(method), ex)); } catch (IllegalArgumentException ex) { notifier.fireTestFailure(new Failure(describeChild(method), ex)); } catch (InvocationTargetException ex) { notifier.fireTestFailure(new Failure(describeChild(method), ex)); } finally { submitted.decrementAndGet(); } } });
public void addFailure(Throwable targetException) { if (targetException instanceof MultipleFailureException) { addMultipleFailureException((MultipleFailureException) targetException); } else { notifier.fireTestFailure(new Failure(description, targetException)); } }
@Override public void error(Throwable e) { notifier.fireTestFailure(new Failure(description, e)); onComplete.accept(false); } };
public void addError(Test test, Throwable e) { Failure failure = new Failure(asDescription(test), e); notifier.fireTestFailure(failure); }
public void addFailure(Throwable targetException) { if (targetException instanceof MultipleFailureException) { addMultipleFailureException((MultipleFailureException) targetException); } else { fNotifier .fireTestFailure(new Failure(fDescription, targetException)); } }
public void addError(Test test, Throwable t) { Failure failure = new Failure(asDescription(test), t); fNotifier.fireTestFailure(failure); }
public void addFailure(Throwable targetException) { if (targetException instanceof MultipleFailureException) { addMultipleFailureException((MultipleFailureException) targetException); } else { notifier.fireTestFailure(new Failure(description, targetException)); } }
private void testAborted(RunNotifier notifier, Description description, Throwable e) { notifier.fireTestStarted(description); notifier.fireTestFailure(new Failure(description, e)); notifier.fireTestFinished(description); }
private void testAborted(RunNotifier notifier, Description description, Throwable e) { notifier.fireTestStarted(description); notifier.fireTestFailure(new Failure(description, e)); notifier.fireTestFinished(description); }
@Override public void testFinished(Description description) throws Exception { super.testFinished(description); try { Mockito.validateMockitoUsage(); } catch(Throwable t) { notifier.fireTestFailure(new Failure(description, t)); } } }
public void validateUnusedStubs(Class<?> testClass, RunNotifier notifier) { Collection<Invocation> unused = new UnusedStubbingsFinder().getUnusedStubbingsByLocation(mocks); if (unused.isEmpty()) { return; //whoa!!! All stubbings were used! } //Oups, there are unused stubbings Description unnecessaryStubbings = Description.createTestDescription(testClass, "unnecessary Mockito stubbings"); notifier.fireTestFailure(new Failure(unnecessaryStubbings, Reporter.formatUnncessaryStubbingException(testClass, unused))); }
private void runCause(Throwable child, RunNotifier notifier) { Description description = describeCause(); notifier.fireTestStarted(description); notifier.fireTestFailure(new Failure(description, child)); notifier.fireTestFinished(description); } }
private void runCause(Throwable child, RunNotifier notifier) { Description description = describeCause(child); notifier.fireTestStarted(description); notifier.fireTestFailure(new Failure(description, child)); notifier.fireTestFinished(description); } }
@Override public void onSpecError(PageValidation pageValidation, String objectName, com.galenframework.specs.Spec spec, ValidationResult validationResult) { Description description = createDescriptionForSpec(objectName, spec); Failure failure = new Failure(description, new AssertionError(validationResult.getError().getMessages())); runNotifier.fireTestFailure(failure); runNotifier.fireTestFinished(description); }
private TestRun compile(Method child, RunNotifier notifier, RunKind kind, CompileFunction compiler, Consumer<Boolean> onComplete) { Description description = describeChild(child); CompileResult compileResult; try { compileResult = compiler.compile(child); } catch (Exception e) { notifier.fireTestFailure(new Failure(description, e)); notifier.fireTestFinished(description); latch.countDown(); return null; } if (!compileResult.success) { notifier.fireTestFailure(new Failure(description, new AssertionError(compileResult.errorMessage))); return null; } TestRunCallback callback = new TestRunCallback() { @Override public void complete() { onComplete.accept(true); } @Override public void error(Throwable e) { notifier.fireTestFailure(new Failure(description, e)); onComplete.accept(false); } }; return new TestRun(compileResult.file.getParentFile(), child, description, compileResult.file.getName(), kind, callback); }