Class TestContextFactory

java.lang.Object
org.citrusframework.context.TestContextFactory
All Implemented Interfaces:
ReferenceResolverAware
Direct Known Subclasses:
StaticTestContextFactory

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 as FunctionRegistry or GlobalVariables.
  • Constructor Details

    • TestContextFactory

      public TestContextFactory()
  • Method Details

    • newInstance

      public static TestContextFactory newInstance()
      Create new empty instance with default components set.
      Returns:
    • copyOf

      public static TestContext copyOf(TestContext context)
    • 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)
      Specified by:
      setReferenceResolver in interface ReferenceResolverAware
    • 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 -
    • getAfterTest

      public List<AfterTest> getAfterTest()
      Obtains the afterTest.
      Returns:
    • 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 -
    • getLogModifier

      public LogModifier getLogModifier()
      Gets the logModifier.
      Returns:
    • setLogModifier

      public void setLogModifier(LogModifier logModifier)
      Sets the logModifier.
      Parameters:
      logModifier -
    • getSegmentVariableExtractorRegistry

      public SegmentVariableExtractorRegistry getSegmentVariableExtractorRegistry()
      Gets the segmentVariableExtractorRegistry
      Returns:
    • setSegmentVariableExtractorRegistry

      public void setSegmentVariableExtractorRegistry(SegmentVariableExtractorRegistry segmentVariableExtractorRegistry)
      Sets the segmentVariableExtractorRegistry
      Parameters:
      segmentVariableExtractorRegistry -