Class IntegrationObjectModelBuilder

java.lang.Object
org.junit.rules.ExternalResource
de.hybris.platform.integrationservices.IntegrationObjectModelBuilder
All Implemented Interfaces:
org.junit.rules.TestRule

public class IntegrationObjectModelBuilder extends org.junit.rules.ExternalResource
Integration object builder to build an IntegrationObjectModel.
  • Method Details

    • integrationObject

      public static IntegrationObjectModelBuilder integrationObject()
      Get a new instance of the builder
      Returns:
      IntegrationObjectModelBuilder
    • cleanAlways

      public IntegrationObjectModelBuilder cleanAlways()
      Specifies to run cleanup/after methods of this rule even if build() method was not called. If cleanAlways( ) is not called, then the after/cleanup method of this rule will clean only integration objects, which were explicitly created by calling the build() method. With this option, this builder will remove all objects specified by calling withCode(String) method, even if build( ) was not called later. This is useful, if instead of calling the build() method, production code executed by the test creates the same integration object as specified in this builder.
      Returns:
      a builder specified to cleanup even not created objects
    • withCode

      public IntegrationObjectModelBuilder withCode(String code)
    • withItem

    • withClass

    • build

      public IntegrationObjectModel build()
      Each time build() is called, a new instance of the the IntegrationObjectModel is returned with the same properties that were set.
      Returns:
      IntegrationObjectModel
    • generateImpex

      public List<String> generateImpex()
    • cleanup

      public void cleanup()
      Deletes all integration objects created from this builder
    • before

      protected void before()
      Overrides:
      before in class org.junit.rules.ExternalResource
    • after

      protected void after()
      Overrides:
      after in class org.junit.rules.ExternalResource