Package org.citrusframework.common
Class JavaTestLoader
java.lang.Object
org.citrusframework.common.DefaultTestLoader
org.citrusframework.common.JavaTestLoader
- All Implemented Interfaces:
TestLoader,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).Gets custom Spring application context file for the Java test case.voidSets custom Spring application context file for Java test case.Methods inherited from class org.citrusframework.common.DefaultTestLoader
citrus, citrusContext, configureTestCase, context, doWithTestCase, getTestCase, initializeTestRunner, 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
Gets custom Spring application context file for the Java test case. If not set creates default context file path from testName and packageName.- Returns:
-
getClassName
-
setSource
Sets custom Spring application context file for Java test case.- Specified by:
setSourcein interfaceTestSourceAware- Parameters:
source-
-