Class EUnitTestCase
- java.lang.Object
-
- org.eclipse.epsilon.workflow.test.WorkflowTestCase
-
- org.eclipse.epsilon.workflow.tasks.eunit.EUnitTestCase
-
- All Implemented Interfaces:
ErrorHandler
- Direct Known Subclasses:
EUnitBasicTests
,EUnitInlineModelTests
,EUnitModelComparisonTests
,EUnitWithEGLTests
,EUnitWithEVLTests
public abstract class EUnitTestCase extends WorkflowTestCase implements ErrorHandler
Abstract superclass for all EUnit test suites.- Author:
- Antonio Garcia-Dominguez
-
-
Field Summary
Fields Modifier and Type Field Description protected static File
ANT_BUILD_FILE
protected static File
BASE_DIR
-
Constructor Summary
Constructors Constructor Description EUnitTestCase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addTaskDefinitionsTo(org.apache.tools.ant.Project project)
protected void
checkOutput(File file, String expectedPackage, String[] expectedTestCases, Set<String> expectedCasesWithFailures, Set<String> expectedCasesWithErrors)
Checks that the JUnit-style XML reports are well-formed.void
cleanUp()
void
error(SAXParseException exception)
void
fatalError(SAXParseException exception)
void
warning(SAXParseException exception)
-
Methods inherited from class org.eclipse.epsilon.workflow.test.WorkflowTestCase
assertContains, runTarget
-
-
-
-
Method Detail
-
addTaskDefinitionsTo
protected void addTaskDefinitionsTo(org.apache.tools.ant.Project project)
- Specified by:
addTaskDefinitionsTo
in classWorkflowTestCase
-
cleanUp
public void cleanUp()
-
error
public void error(SAXParseException exception) throws SAXException
- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
public void fatalError(SAXParseException exception) throws SAXException
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
warning
public void warning(SAXParseException exception) throws SAXException
- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-
checkOutput
protected void checkOutput(File file, String expectedPackage, String[] expectedTestCases, Set<String> expectedCasesWithFailures, Set<String> expectedCasesWithErrors) throws SAXException, ParserConfigurationException, IOException
Checks that the JUnit-style XML reports are well-formed. There is no official schema for these, so we have defined our own schema for internal testing. We've based it on the Ant source code and this mailing list post.- Throws:
SAXException
- XML Schema could not be loaded, or the JUnit XML output could not be parsed or was invalid.ParserConfigurationException
- There was a problem while configuring the XML parser for the JUnit XML output.IOException
- There was a problem while reading from the specified path.
-
-