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.ExternalResourceIntegration object builder to build anIntegrationObjectModel.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafter()protected voidbefore()IntegrationObjectModelbuild()Each time build() is called, a new instance of the theIntegrationObjectModelis returned with the same properties that were set.IntegrationObjectModelBuildercleanAlways()Specifies to run cleanup/after methods of this rule even ifbuild()method was not called.voidcleanup()Deletes all integration objects created from this builderjava.util.List<java.lang.String>generateImpex()static IntegrationObjectModelBuilderintegrationObject()Get a new instance of the builderIntegrationObjectModelBuilderwithCode(java.lang.String code)IntegrationObjectModelBuilderwithItem(IntegrationObjectItemModelBuilder builder)
-
-
-
Method Detail
-
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 ifbuild()method was not called. IfcleanAlways( )is not called, then the after/cleanup method of this rule will clean only integration objects, which were explicitly created by calling thebuild()method. With this option, this builder will remove all objects specified by callingwithCode(String)method, even ifbuild( )was not called later. This is useful, if instead of calling thebuild()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(java.lang.String code)
-
withItem
public IntegrationObjectModelBuilder withItem(IntegrationObjectItemModelBuilder builder)
-
build
public IntegrationObjectModel build()
Each time build() is called, a new instance of the theIntegrationObjectModelis returned with the same properties that were set.- Returns:
- IntegrationObjectModel
-
generateImpex
public java.util.List<java.lang.String> generateImpex()
-
cleanup
public void cleanup()
Deletes all integration objects created from this builder
-
before
protected void before()
- Overrides:
beforein classorg.junit.rules.ExternalResource
-
after
protected void after()
- Overrides:
afterin classorg.junit.rules.ExternalResource
-
-