Package org.citrusframework.context
Class TestContextFactory
java.lang.Object
org.citrusframework.context.TestContextFactory
- All Implemented Interfaces:
ReferenceResolverAware
- Direct Known Subclasses:
StaticTestContextFactory
Factory bean implementation constructs test context instances. Takes care of adding proper default components
to the test context such as
FunctionRegistry or GlobalVariables.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TestContextcopyOf(TestContext context) Obtains the afterTest.Obtains the beforeTest.Gets the endpoint factory.Gets the logModifier.Gets the message listeners.Gets the message processors.Gets the message validator registry.Gets the namespace context builder.Factory method creates new test context instance and adds all default components in this factory.Gets the value of the referenceResolver property.Gets the segmentVariableExtractorRegistryObtains the testActionListeners.Gets the test listeners.Obtains the typeConverter.static TestContextFactoryCreate new empty instance with default components set.voidsetAfterTest(List<AfterTest> afterTest) Specifies the afterTest.voidsetBeforeTest(List<BeforeTest> beforeTest) Specifies the beforeTest.voidsetEndpointFactory(EndpointFactory endpointFactory) Sets the endpoint factory.voidsetFunctionRegistry(FunctionRegistry functionRegistry) voidsetGlobalVariables(GlobalVariables globalVariables) voidsetLogModifier(LogModifier logModifier) Sets the logModifier.voidsetMessageListeners(MessageListeners messageListeners) Sets the message listeners.voidsetMessageProcessors(MessageProcessors messageProcessors) Sets the message processors.voidsetMessageValidatorRegistry(MessageValidatorRegistry messageValidatorRegistry) Sets the message validator registry.voidsetNamespaceContextBuilder(NamespaceContextBuilder namespaceContextBuilder) Sets the namespace context builder.voidsetReferenceResolver(ReferenceResolver referenceResolver) voidsetSegmentVariableExtractorRegistry(SegmentVariableExtractorRegistry segmentVariableExtractorRegistry) Sets the segmentVariableExtractorRegistryvoidsetTestActionListeners(TestActionListeners testActionListeners) Specifies the testActionListeners.voidsetTestListeners(TestListeners testListeners) Sets the test listeners.voidsetTypeConverter(TypeConverter typeConverter) Specifies the typeConverter.voidsetValidationMatcherRegistry(ValidationMatcherRegistry validationMatcherRegistry)
-
Constructor Details
-
TestContextFactory
public TestContextFactory()
-
-
Method Details
-
newInstance
Create new empty instance with default components set.- Returns:
-
copyOf
-
getObject
Factory method creates new test context instance and adds all default components in this factory.- Returns:
-
setFunctionRegistry
- Parameters:
functionRegistry- the functionRegistry to set
-
getFunctionRegistry
- Returns:
- the functionRegistry
-
setValidationMatcherRegistry
- Parameters:
validationMatcherRegistry- the validationMatcherRegistry to set
-
getValidationMatcherRegistry
- Returns:
- the validationMatcherRegistry
-
setGlobalVariables
- Parameters:
globalVariables- the globalVariables to set
-
getGlobalVariables
- Returns:
- the globalVariables
-
getEndpointFactory
Gets the endpoint factory.- Returns:
-
setEndpointFactory
Sets the endpoint factory.- Parameters:
endpointFactory-
-
getReferenceResolver
Gets the value of the referenceResolver property.- Returns:
- the referenceResolver
-
setReferenceResolver
- Specified by:
setReferenceResolverin interfaceReferenceResolverAware
-
setNamespaceContextBuilder
Sets the namespace context builder.- Parameters:
namespaceContextBuilder-
-
getNamespaceContextBuilder
Gets the namespace context builder.- Returns:
-
setTestListeners
Sets the test listeners.- Parameters:
testListeners-
-
getTestListeners
Gets the test listeners.- Returns:
-
getTestActionListeners
Obtains the testActionListeners.- Returns:
-
setTestActionListeners
Specifies the testActionListeners.- Parameters:
testActionListeners-
-
getBeforeTest
Obtains the beforeTest.- Returns:
-
setBeforeTest
Specifies the beforeTest.- Parameters:
beforeTest-
-
getAfterTest
Obtains the afterTest.- Returns:
-
setAfterTest
Specifies the afterTest.- Parameters:
afterTest-
-
setMessageValidatorRegistry
Sets the message validator registry.- Parameters:
messageValidatorRegistry-
-
getMessageValidatorRegistry
Gets the message validator registry.- Returns:
-
setMessageListeners
Sets the message listeners.- Parameters:
messageListeners-
-
getMessageListeners
Gets the message listeners.- Returns:
-
setMessageProcessors
Sets the message processors.- Parameters:
messageProcessors-
-
getMessageProcessors
Gets the message processors.- Returns:
-
getTypeConverter
Obtains the typeConverter.- Returns:
-
setTypeConverter
Specifies the typeConverter.- Parameters:
typeConverter-
-
getLogModifier
Gets the logModifier.- Returns:
-
setLogModifier
Sets the logModifier.- Parameters:
logModifier-
-
getSegmentVariableExtractorRegistry
Gets the segmentVariableExtractorRegistry- Returns:
-
setSegmentVariableExtractorRegistry
public void setSegmentVariableExtractorRegistry(SegmentVariableExtractorRegistry segmentVariableExtractorRegistry) Sets the segmentVariableExtractorRegistry- Parameters:
segmentVariableExtractorRegistry-
-