@Override public void testIgnored(Description description) throws Exception { if (resultWrapper != null) { resultWrapper.testIgnored(asTest(description)); } }
@Override public void testIgnored(Test test) { formatSkip(test, JUnitVersionHelper.getIgnoreMessage(test)); }
/** * Set the unless attribute. If this expression evaluates to * false or the name of a property which is not present in * project, the test will be run. * @param propertyName the expression to evaluate */ public void setUnless(String propertyName) { setUnless((Object) propertyName); }
/** * Interface TestListener. * * <p>A new Test is started. * @param t the test. */ @Override public void startTest(final Test t) { final String testName = JUnitVersionHelper.getTestCaseName(t); logTestListenerEvent("startTest(" + testName + ")"); }
public List<Test> getTests() { return cache.asTestList(getDescription()); }
private void fireEndTestSuite() { for (JUnitTaskMirror.JUnitResultFormatterMirror f : formatters) { ((JUnitResultFormatter) f).endTestSuite(junitTest); } }
/** * A test caused an error. * @param test a test * @param error the error thrown by the test */ @Override public void addError(Test test, Throwable error) { formatError("\tCaused an ERROR", test, error); }
/** {@inheritDoc}. */ @Override public JUnitTaskMirror.SummaryJUnitResultFormatterMirror newSummaryJUnitResultFormatter() { return new SummaryJUnitResultFormatter(); }
/** * Interface TestListener for JUnit > 3.4. * * <p>A Test failed. * @param test the test. * @param t the assertion thrown by the test. */ @Override public void addFailure(final Test test, final AssertionFailedError t) { addFailure(test, (Throwable) t); }
/** {@inheritDoc}. */ @Override public void setSystemOutput(final String out) { formatOutput(SYSTEM_OUT, out); }
/** * Interface TestListener for JUnit <= 3.4. * * <p>A Test failed. * @param test the test. * @param t the exception. */ public void addFailure(final Test test, final Throwable t) { formatError(FAILURE, test, t); }
/** * Interface TestListener for JUnit > 3.4. * * <p>A Test failed. * @param test the test. * @param t the assertion. */ @Override public void addFailure(final Test test, final AssertionFailedError t) { addFailure(test, (Throwable) t); }
@Override public void testIgnored(Test test) { if (wrapped instanceof IgnoredTestListener) { ((IgnoredTestListener) wrapped).testIgnored(test); } }
/** * Interface TestListener for JUnit <= 3.4. * * <p>A Test failed. * @param test the test. * @param t the exception. */ public void addFailure(Test test, Throwable t) { formatError("\tFAILED", test, t); }
/** * Interface TestListener for JUnit > 3.4. * * <p>A Test failed. * @param test not used. * @param t not used. */ @Override public void addFailure(Test test, AssertionFailedError t) { addFailure(test, (Throwable) t); } /**
/** * Only invoke tearDown if the suite is known and not the dummy * test we get when a Batch fails and the error is an actual * error generated by Ant. */ @Override public void addError(final Test fakeTest, final Throwable t) { if (suiteName != null && fakeTest instanceof JUnitTaskMirrorImpl.VmExitErrorTest) { tearDown(); } }
/** * Get the number of nodes in the list. * @return the length of the list. */ @Override public int getLength() { return size(); } /**
/** * Set the if attribute. * If this expression evaluates to true or the name of a property * which is present in project, the test will be run. * @param propertyName the expression to evaluate */ public void setIf(String propertyName) { setIf((Object) propertyName); }
/** * Interface TestListener. * * <p>A Test is finished. * @param test the test. */ @Override public void endTest(final Test test) { final String testName = JUnitVersionHelper.getTestCaseName(test); logTestListenerEvent("endTest(" + testName + ")"); }
/** * Interface TestListener for JUnit <= 3.4. * * <p>A Test failed. * @param test a test * @param t the exception thrown by the test */ public void addFailure(Test test, Throwable t) { formatError("\tFAILED", test, t); }