Package org.eclipse.epsilon.eunit
Class EUnitModule
java.lang.Object
org.eclipse.epsilon.common.module.AbstractModuleElement
org.eclipse.epsilon.eol.AbstractModule
org.eclipse.epsilon.eol.EolModule
org.eclipse.epsilon.eunit.EUnitModule
- All Implemented Interfaces:
IModule
,ModuleElement
,IEolModule
,IEUnitModule
-
Field Summary
Fields inherited from class org.eclipse.epsilon.eol.EolModule
context, declaredModelDeclarations, declaredOperations, imports, main, modelDeclarations, operations, postOperationStatements
Fields inherited from class org.eclipse.epsilon.eol.AbstractModule
parseProblems, parser, sourceFile, sourceUri
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addTestListener
(EUnitTestListener listener) static String
getBasename
(ModuleElement moduleElement) Returns the "class name" to be used for this module in JUnit-style reports.protected List<ModelBindings>
getModelBindings
(Operation opTest) Returns the path to the directory which will store the clones used to freeze models during comparisons.Returns the package name to use in the reports.Returns the logical name of this module as if it was a Java class, for the JUnit-style reports.Returns the destination directory for the JUnit-style XML report.List<?>
getTests()
boolean
isAnnotatedAs
(Operation operation, String annotation) boolean
removeTestListener
(EUnitTestListener listener) void
void
setModelCloneDirectory
(File modelCloneDirectory) Changes the model clone directory.void
setPackage
(String packageName) Changes the package name to use in the reports.void
setReportDirectory
(File reportFile) If not null, a JUnit-style XML report will be saved to the specific destination directory.void
setSelectedOperations
(List<?> attribute) Methods inherited from class org.eclipse.epsilon.eol.EolModule
adapt, build, checkImports, clearCache, createDebugger, createLexer, createParser, execute, getContext, getDeclaredModelDeclarations, getDeclaredOperations, getImportConfiguration, getImportManager, getImports, getImportsByExtension, getMain, getMainRule, getModelDeclarations, getOperations, getParentModule, getPostOperationStatements, prepareContext, setContext, setImportManager, setMain, setParentModule, toString
Methods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRule, parse, parse
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.epsilon.eol.IEolModule
configure, createDebugger, execute, getConfigurationProperties, getContext, getDeclaredModelDeclarations, getDeclaredOperations, getImportManager, getImports, getMain, getModelDeclarations, getOperations, getParentModule, getParseProblems, getPostOperationStatements, parse, setContext, setImportManager, setParentModule
Methods inherited from interface org.eclipse.epsilon.common.module.IModule
createAst, getSourceUri, parse, parse, parse, parse, parse
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
build, getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
Field Details
-
DEFAULT_PACKAGE
Default package name for the JUnit reports.- See Also:
-
-
Constructor Details
-
EUnitModule
public EUnitModule()
-
-
Method Details
-
getTests
- Specified by:
getTests
in interfaceIEUnitModule
-
getInlineModelOperations
- Specified by:
getInlineModelOperations
in interfaceIEUnitModule
-
getSetups
- Specified by:
getSetups
in interfaceIEUnitModule
-
getTeardowns
- Specified by:
getTeardowns
in interfaceIEUnitModule
-
getSuiteSetups
- Specified by:
getSuiteSetups
in interfaceIEUnitModule
-
getSuiteTeardowns
- Specified by:
getSuiteTeardowns
in interfaceIEUnitModule
-
getCustomComparators
- Specified by:
getCustomComparators
in interfaceIEUnitModule
-
getDataVariableNames
- Specified by:
getDataVariableNames
in interfaceIEUnitModule
-
isAnnotatedAs
- Specified by:
isAnnotatedAs
in interfaceIEUnitModule
-
executeImpl
- Overrides:
executeImpl
in classEolModule
- Throws:
EolRuntimeException
-
getSuiteRoot
- Specified by:
getSuiteRoot
in interfaceIEUnitModule
- Throws:
EolRuntimeException
-
runSuite
- Specified by:
runSuite
in interfaceIEUnitModule
- Throws:
EolRuntimeException
-
getModelBindings
- Throws:
EolRuntimeException
-
addTestListener
- Specified by:
addTestListener
in interfaceIEUnitModule
-
removeTestListener
- Specified by:
removeTestListener
in interfaceIEUnitModule
-
getSelectedOperations
- Specified by:
getSelectedOperations
in interfaceIEUnitModule
-
setSelectedOperations
- Specified by:
setSelectedOperations
in interfaceIEUnitModule
- Throws:
EolRuntimeException
-
setReportDirectory
If not null, a JUnit-style XML report will be saved to the specific destination directory. By default, it is not generated.- Specified by:
setReportDirectory
in interfaceIEUnitModule
-
getReportDirectory
Returns the destination directory for the JUnit-style XML report. For details about possible values, seesetReportDirectory(File)
.- Specified by:
getReportDirectory
in interfaceIEUnitModule
-
getClassName
Returns the "class name" to be used for this module in JUnit-style reports. It is the basename of the .eunit file, without the extension.- Specified by:
getClassName
in interfaceIEUnitModule
-
getPackage
Returns the package name to use in the reports. By default, it isDEFAULT_PACKAGE
.- Specified by:
getPackage
in interfaceIEUnitModule
-
setPackage
Changes the package name to use in the reports. By default, it isDEFAULT_PACKAGE
.- Specified by:
setPackage
in interfaceIEUnitModule
-
getQualifiedName
Returns the logical name of this module as if it was a Java class, for the JUnit-style reports.- Specified by:
getQualifiedName
in interfaceIEUnitModule
-
getModelCloneDirectory
Description copied from interface:IEUnitModule
Returns the path to the directory which will store the clones used to freeze models during comparisons. By default, this will be#DEFAULT_EUNIT_MODEL_CLONE_DIR
in the current directory. If set tonull
, the operating system's system-wide temporary folder will be used.- Specified by:
getModelCloneDirectory
in interfaceIEUnitModule
-
setModelCloneDirectory
Description copied from interface:IEUnitModule
Changes the model clone directory.- Specified by:
setModelCloneDirectory
in interfaceIEUnitModule
- See Also:
-
getBasename
-