Class TestContextFactory

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

public class TestContextFactory extends Object implements org.citrusframework.spi.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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.citrusframework.context.TestContext
    copyOf(org.citrusframework.context.TestContext context)
     
    List<org.citrusframework.container.AfterTest>
    Obtains the afterTest.
    List<org.citrusframework.container.BeforeTest>
    Obtains the beforeTest.
    org.citrusframework.endpoint.EndpointFactory
    Gets the endpoint factory.
    org.citrusframework.functions.FunctionRegistry
     
    org.citrusframework.variable.GlobalVariables
     
    org.citrusframework.log.LogModifier
    Gets the logModifier.
    org.citrusframework.report.MessageListeners
    Gets the message listeners.
    org.citrusframework.message.MessageProcessors
    Gets the message processors.
    org.citrusframework.validation.MessageValidatorRegistry
    Gets the message validator registry.
    org.citrusframework.xml.namespace.NamespaceContextBuilder
    Gets the namespace context builder.
    org.citrusframework.context.TestContext
    Factory method creates new test context instance and adds all default components in this factory.
    org.citrusframework.spi.ReferenceResolver
    Gets the value of the referenceResolver property.
    org.citrusframework.variable.SegmentVariableExtractorRegistry
    Gets the segmentVariableExtractorRegistry
    org.citrusframework.report.TestActionListeners
    Obtains the testActionListeners.
    org.citrusframework.report.TestListeners
    Gets the test listeners.
    org.citrusframework.util.TypeConverter
    Obtains the typeConverter.
    org.citrusframework.validation.matcher.ValidationMatcherRegistry
     
    Create new empty instance with default components set.
    void
    setAfterTest(List<org.citrusframework.container.AfterTest> afterTest)
    Specifies the afterTest.
    void
    setBeforeTest(List<org.citrusframework.container.BeforeTest> beforeTest)
    Specifies the beforeTest.
    void
    setEndpointFactory(org.citrusframework.endpoint.EndpointFactory endpointFactory)
    Sets the endpoint factory.
    void
    setFunctionRegistry(org.citrusframework.functions.FunctionRegistry functionRegistry)
     
    void
    setGlobalVariables(org.citrusframework.variable.GlobalVariables globalVariables)
     
    void
    setLogModifier(org.citrusframework.log.LogModifier logModifier)
    Sets the logModifier.
    void
    setMessageListeners(org.citrusframework.report.MessageListeners messageListeners)
    Sets the message listeners.
    void
    setMessageProcessors(org.citrusframework.message.MessageProcessors messageProcessors)
    Sets the message processors.
    void
    setMessageValidatorRegistry(org.citrusframework.validation.MessageValidatorRegistry messageValidatorRegistry)
    Sets the message validator registry.
    void
    setNamespaceContextBuilder(org.citrusframework.xml.namespace.NamespaceContextBuilder namespaceContextBuilder)
    Sets the namespace context builder.
    void
    setReferenceResolver(org.citrusframework.spi.ReferenceResolver referenceResolver)
     
    void
    setSegmentVariableExtractorRegistry(org.citrusframework.variable.SegmentVariableExtractorRegistry segmentVariableExtractorRegistry)
    Sets the segmentVariableExtractorRegistry
    void
    setTestActionListeners(org.citrusframework.report.TestActionListeners testActionListeners)
    Specifies the testActionListeners.
    void
    setTestListeners(org.citrusframework.report.TestListeners testListeners)
    Sets the test listeners.
    void
    setTypeConverter(org.citrusframework.util.TypeConverter typeConverter)
    Specifies the typeConverter.
    void
    setValidationMatcherRegistry(org.citrusframework.validation.matcher.ValidationMatcherRegistry validationMatcherRegistry)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestContextFactory

      public TestContextFactory()
  • Method Details

    • newInstance

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

      public static org.citrusframework.context.TestContext copyOf(org.citrusframework.context.TestContext context)
    • getObject

      public org.citrusframework.context.TestContext getObject()
      Factory method creates new test context instance and adds all default components in this factory.
      Returns:
    • setFunctionRegistry

      public void setFunctionRegistry(org.citrusframework.functions.FunctionRegistry functionRegistry)
      Parameters:
      functionRegistry - the functionRegistry to set
    • getFunctionRegistry

      public org.citrusframework.functions.FunctionRegistry getFunctionRegistry()
      Returns:
      the functionRegistry
    • setValidationMatcherRegistry

      public void setValidationMatcherRegistry(org.citrusframework.validation.matcher.ValidationMatcherRegistry validationMatcherRegistry)
      Parameters:
      validationMatcherRegistry - the validationMatcherRegistry to set
    • getValidationMatcherRegistry

      public org.citrusframework.validation.matcher.ValidationMatcherRegistry getValidationMatcherRegistry()
      Returns:
      the validationMatcherRegistry
    • setGlobalVariables

      public void setGlobalVariables(org.citrusframework.variable.GlobalVariables globalVariables)
      Parameters:
      globalVariables - the globalVariables to set
    • getGlobalVariables

      public org.citrusframework.variable.GlobalVariables getGlobalVariables()
      Returns:
      the globalVariables
    • getEndpointFactory

      public org.citrusframework.endpoint.EndpointFactory getEndpointFactory()
      Gets the endpoint factory.
      Returns:
    • setEndpointFactory

      public void setEndpointFactory(org.citrusframework.endpoint.EndpointFactory endpointFactory)
      Sets the endpoint factory.
      Parameters:
      endpointFactory -
    • getReferenceResolver

      public org.citrusframework.spi.ReferenceResolver getReferenceResolver()
      Gets the value of the referenceResolver property.
      Returns:
      the referenceResolver
    • setReferenceResolver

      public void setReferenceResolver(org.citrusframework.spi.ReferenceResolver referenceResolver)
      Specified by:
      setReferenceResolver in interface org.citrusframework.spi.ReferenceResolverAware
    • setNamespaceContextBuilder

      public void setNamespaceContextBuilder(org.citrusframework.xml.namespace.NamespaceContextBuilder namespaceContextBuilder)
      Sets the namespace context builder.
      Parameters:
      namespaceContextBuilder -
    • getNamespaceContextBuilder

      public org.citrusframework.xml.namespace.NamespaceContextBuilder getNamespaceContextBuilder()
      Gets the namespace context builder.
      Returns:
    • setTestListeners

      public void setTestListeners(org.citrusframework.report.TestListeners testListeners)
      Sets the test listeners.
      Parameters:
      testListeners -
    • getTestListeners

      public org.citrusframework.report.TestListeners getTestListeners()
      Gets the test listeners.
      Returns:
    • getTestActionListeners

      public org.citrusframework.report.TestActionListeners getTestActionListeners()
      Obtains the testActionListeners.
      Returns:
    • setTestActionListeners

      public void setTestActionListeners(org.citrusframework.report.TestActionListeners testActionListeners)
      Specifies the testActionListeners.
      Parameters:
      testActionListeners -
    • getBeforeTest

      public List<org.citrusframework.container.BeforeTest> getBeforeTest()
      Obtains the beforeTest.
      Returns:
    • setBeforeTest

      public void setBeforeTest(List<org.citrusframework.container.BeforeTest> beforeTest)
      Specifies the beforeTest.
      Parameters:
      beforeTest -
    • getAfterTest

      public List<org.citrusframework.container.AfterTest> getAfterTest()
      Obtains the afterTest.
      Returns:
    • setAfterTest

      public void setAfterTest(List<org.citrusframework.container.AfterTest> afterTest)
      Specifies the afterTest.
      Parameters:
      afterTest -
    • setMessageValidatorRegistry

      public void setMessageValidatorRegistry(org.citrusframework.validation.MessageValidatorRegistry messageValidatorRegistry)
      Sets the message validator registry.
      Parameters:
      messageValidatorRegistry -
    • getMessageValidatorRegistry

      public org.citrusframework.validation.MessageValidatorRegistry getMessageValidatorRegistry()
      Gets the message validator registry.
      Returns:
    • setMessageListeners

      public void setMessageListeners(org.citrusframework.report.MessageListeners messageListeners)
      Sets the message listeners.
      Parameters:
      messageListeners -
    • getMessageListeners

      public org.citrusframework.report.MessageListeners getMessageListeners()
      Gets the message listeners.
      Returns:
    • setMessageProcessors

      public void setMessageProcessors(org.citrusframework.message.MessageProcessors messageProcessors)
      Sets the message processors.
      Parameters:
      messageProcessors -
    • getMessageProcessors

      public org.citrusframework.message.MessageProcessors getMessageProcessors()
      Gets the message processors.
      Returns:
    • getTypeConverter

      public org.citrusframework.util.TypeConverter getTypeConverter()
      Obtains the typeConverter.
      Returns:
    • setTypeConverter

      public void setTypeConverter(org.citrusframework.util.TypeConverter typeConverter)
      Specifies the typeConverter.
      Parameters:
      typeConverter -
    • getLogModifier

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

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

      public org.citrusframework.variable.SegmentVariableExtractorRegistry getSegmentVariableExtractorRegistry()
      Gets the segmentVariableExtractorRegistry
      Returns:
    • setSegmentVariableExtractorRegistry

      public void setSegmentVariableExtractorRegistry(org.citrusframework.variable.SegmentVariableExtractorRegistry segmentVariableExtractorRegistry)
      Sets the segmentVariableExtractorRegistry
      Parameters:
      segmentVariableExtractorRegistry -