Package com.consol.citrus.context
Class TestContextFactory
- java.lang.Object
-
- com.consol.citrus.context.TestContextFactory
-
- All Implemented Interfaces:
ReferenceResolverAware
public class TestContextFactory extends Object implements ReferenceResolverAware
Factory bean implementation constructs test context instances. Takes care of adding proper default components to the test context such asFunctionRegistryorGlobalVariables.- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description TestContextFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AfterTest>getAfterTest()Obtains the afterTest.List<BeforeTest>getBeforeTest()Obtains the beforeTest.EndpointFactorygetEndpointFactory()Gets the endpoint factory.FunctionRegistrygetFunctionRegistry()GlobalVariablesgetGlobalVariables()MessageListenersgetMessageListeners()Gets the message listeners.MessageProcessorsgetMessageProcessors()Gets the message processors.MessageValidatorRegistrygetMessageValidatorRegistry()Gets the message validator registry.NamespaceContextBuildergetNamespaceContextBuilder()Gets the namespace context builder.TestContextgetObject()Factory method creates new test context instance and adds all default components in this factory.ReferenceResolvergetReferenceResolver()Gets the value of the referenceResolver property.TestActionListenersgetTestActionListeners()Obtains the testActionListeners.TestListenersgetTestListeners()Gets the test listeners.TypeConvertergetTypeConverter()Obtains the typeConverter.ValidationMatcherRegistrygetValidationMatcherRegistry()static TestContextFactorynewInstance()Create 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)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)Sets the reference resolver.voidsetTestActionListeners(TestActionListeners testActionListeners)Specifies the testActionListeners.voidsetTestListeners(TestListeners testListeners)Sets the test listeners.voidsetTypeConverter(TypeConverter typeConverter)Specifies the typeConverter.voidsetValidationMatcherRegistry(ValidationMatcherRegistry validationMatcherRegistry)
-
-
-
Method Detail
-
newInstance
public static TestContextFactory newInstance()
Create new empty instance with default components set.- Returns:
-
getObject
public TestContext getObject()
Factory method creates new test context instance and adds all default components in this factory.- Returns:
-
setFunctionRegistry
public void setFunctionRegistry(FunctionRegistry functionRegistry)
- Parameters:
functionRegistry- the functionRegistry to set
-
getFunctionRegistry
public FunctionRegistry getFunctionRegistry()
- Returns:
- the functionRegistry
-
setValidationMatcherRegistry
public void setValidationMatcherRegistry(ValidationMatcherRegistry validationMatcherRegistry)
- Parameters:
validationMatcherRegistry- the validationMatcherRegistry to set
-
getValidationMatcherRegistry
public ValidationMatcherRegistry getValidationMatcherRegistry()
- Returns:
- the validationMatcherRegistry
-
setGlobalVariables
public void setGlobalVariables(GlobalVariables globalVariables)
- Parameters:
globalVariables- the globalVariables to set
-
getGlobalVariables
public GlobalVariables getGlobalVariables()
- Returns:
- the globalVariables
-
getEndpointFactory
public EndpointFactory getEndpointFactory()
Gets the endpoint factory.- Returns:
-
setEndpointFactory
public void setEndpointFactory(EndpointFactory endpointFactory)
Sets the endpoint factory.- Parameters:
endpointFactory-
-
getReferenceResolver
public ReferenceResolver getReferenceResolver()
Gets the value of the referenceResolver property.- Returns:
- the referenceResolver
-
setReferenceResolver
public void setReferenceResolver(ReferenceResolver referenceResolver)
Description copied from interface:ReferenceResolverAwareSets the reference resolver.- Specified by:
setReferenceResolverin interfaceReferenceResolverAware
-
setNamespaceContextBuilder
public void setNamespaceContextBuilder(NamespaceContextBuilder namespaceContextBuilder)
Sets the namespace context builder.- Parameters:
namespaceContextBuilder-
-
getNamespaceContextBuilder
public NamespaceContextBuilder getNamespaceContextBuilder()
Gets the namespace context builder.- Returns:
-
setTestListeners
public void setTestListeners(TestListeners testListeners)
Sets the test listeners.- Parameters:
testListeners-
-
getTestListeners
public TestListeners getTestListeners()
Gets the test listeners.- Returns:
-
getTestActionListeners
public TestActionListeners getTestActionListeners()
Obtains the testActionListeners.- Returns:
-
setTestActionListeners
public void setTestActionListeners(TestActionListeners testActionListeners)
Specifies the testActionListeners.- Parameters:
testActionListeners-
-
getBeforeTest
public List<BeforeTest> getBeforeTest()
Obtains the beforeTest.- Returns:
-
setBeforeTest
public void setBeforeTest(List<BeforeTest> beforeTest)
Specifies the beforeTest.- Parameters:
beforeTest-
-
setAfterTest
public void setAfterTest(List<AfterTest> afterTest)
Specifies the afterTest.- Parameters:
afterTest-
-
setMessageValidatorRegistry
public void setMessageValidatorRegistry(MessageValidatorRegistry messageValidatorRegistry)
Sets the message validator registry.- Parameters:
messageValidatorRegistry-
-
getMessageValidatorRegistry
public MessageValidatorRegistry getMessageValidatorRegistry()
Gets the message validator registry.- Returns:
-
setMessageListeners
public void setMessageListeners(MessageListeners messageListeners)
Sets the message listeners.- Parameters:
messageListeners-
-
getMessageListeners
public MessageListeners getMessageListeners()
Gets the message listeners.- Returns:
-
setMessageProcessors
public void setMessageProcessors(MessageProcessors messageProcessors)
Sets the message processors.- Parameters:
messageProcessors-
-
getMessageProcessors
public MessageProcessors getMessageProcessors()
Gets the message processors.- Returns:
-
getTypeConverter
public TypeConverter getTypeConverter()
Obtains the typeConverter.- Returns:
-
setTypeConverter
public void setTypeConverter(TypeConverter typeConverter)
Specifies the typeConverter.- Parameters:
typeConverter-
-
-