Package org.citrusframework.common
Class JavaTestLoader
java.lang.Object
org.citrusframework.common.DefaultTestLoader
org.citrusframework.common.JavaTestLoader
- All Implemented Interfaces:
org.citrusframework.common.TestLoader,org.citrusframework.common.TestSourceAware
public class JavaTestLoader
extends DefaultTestLoader
implements org.citrusframework.common.TestSourceAware
Test loader implementation able to compile a Java source file and run the test method
-
Field Summary
Fields inherited from class org.citrusframework.common.DefaultTestLoader
citrus, citrusContext, configurer, context, handler, packageName, runner, testCase, testClass, testNameFields inherited from interface org.citrusframework.common.TestLoader
GROOVY, JAVA, logger, RESOURCE_PATH, SPRING, TYPE_RESOLVER, XML, YAML -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoLoad()Subclasses are supposed to overwrite this method on order to add logic how to load the test case (e.g. from XML, Json, YAML).org.citrusframework.TestSourceGets custom source file for the Java test case.voidsetSource(org.citrusframework.TestSource source) Sets custom source file for Java test case.Methods inherited from class org.citrusframework.common.DefaultTestLoader
citrus, citrusContext, configureTestCase, context, doWithTestCase, getTestCase, initializeTestRunner, isSkipExceptionType, load, packageName, runner, setCitrus, setCitrusContext, setContext, setPackageName, setRunner, setTestCase, setTestClass, setTestName, testCase, testClass, testName
-
Constructor Details
-
JavaTestLoader
public JavaTestLoader()
-
-
Method Details
-
doLoad
public void doLoad()Description copied from class:DefaultTestLoaderSubclasses are supposed to overwrite this method on order to add logic how to load the test case (e.g. from XML, Json, YAML).- Overrides:
doLoadin classDefaultTestLoader
-
getSource
public org.citrusframework.TestSource getSource()Gets custom source file for the Java test case. If not set creates default context file path from testName and packageName. -
getClassName
-
setSource
public void setSource(org.citrusframework.TestSource source) Sets custom source file for Java test case.- Specified by:
setSourcein interfaceorg.citrusframework.common.TestSourceAware
-