Package com.consol.citrus.common
Class XmlTestLoader
- java.lang.Object
-
- com.consol.citrus.common.XmlTestLoader
-
- All Implemented Interfaces:
com.consol.citrus.common.TestLoader
public class XmlTestLoader extends Object implements com.consol.citrus.common.TestLoader
Loads test case as Spring bean from XML application context file. Loader holds application context file for test case and a parent application context. At runtime this class loads the Spring application context and gets test case bean instance from context.- Since:
- 2.1
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description XmlTestLoader(Class<?> testClass, String testName, String packageName, com.consol.citrus.CitrusContext citrusContext)
Default constructor with context file and parent application context field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContextFile()
Gets custom Spring application context file for the XML test case.com.consol.citrus.TestCase
load()
void
setContextFile(String contextFile)
Sets custom Spring application context file for XML test case.
-
-
-
Method Detail
-
load
public com.consol.citrus.TestCase load()
- Specified by:
load
in interfacecom.consol.citrus.common.TestLoader
-
getContextFile
public String getContextFile()
Gets custom Spring application context file for the XML test case. If not set creates default context file path from testName and packageName.- Returns:
-
setContextFile
public void setContextFile(String contextFile)
Sets custom Spring application context file for XML test case.- Parameters:
contextFile
-
-
-