JUnitTaskMirrorImplpublic final class JUnitTaskMirrorImpl extends Object implements JUnitTaskMirrorImplementation of the part of the junit task which can directly refer to junit.* classes.
Public only to permit use of reflection; do not use directly. |
Fields Summary |
---|
private final JUnitTask | task |
Constructors Summary |
---|
public JUnitTaskMirrorImpl(JUnitTask task)Constructor.
this.task = task;
|
Methods Summary |
---|
public void | addVmExit(JUnitTest test, JUnitTaskMirror.JUnitResultFormatterMirror aFormatter, java.io.OutputStream out, java.lang.String message, java.lang.String testCase){@inheritDoc}.
JUnitResultFormatter formatter = (JUnitResultFormatter) aFormatter;
formatter.setOutput(out);
formatter.startTestSuite(test);
//the trick to integrating test output to the formatter, is to
//create a special test class that asserts an error
//and tell the formatter that it raised.
TestCase t = new VmExitErrorTest(message, test, testCase);
formatter.startTest(t);
formatter.addError(t, new AssertionFailedError(message));
formatter.endTestSuite(test);
| public JUnitTaskMirror.JUnitTestRunnerMirror | newJUnitTestRunner(JUnitTest test, boolean haltOnError, boolean filterTrace, boolean haltOnFailure, boolean showOutput, boolean logTestListenerEvents, org.apache.tools.ant.AntClassLoader classLoader){@inheritDoc}.
return new JUnitTestRunner(test, haltOnError, filterTrace, haltOnFailure,
showOutput, logTestListenerEvents, classLoader);
| public JUnitTaskMirror.SummaryJUnitResultFormatterMirror | newSummaryJUnitResultFormatter(){@inheritDoc}.
return new SummaryJUnitResultFormatter();
|
|