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 Summary
Modifier and TypeMethodDescriptionprotected voidafter()protected voidbefore()build()Each time build() is called, a new instance of the theIntegrationObjectModelis returned with the same properties that were set.Specifies to run cleanup/after methods of this rule even ifbuild()method was not called.voidcleanup()Deletes all integration objects created from this builderGet a new instance of the builderMethods inherited from class org.junit.rules.ExternalResource
apply
-
Method Details
-
integrationObject
Get a new instance of the builder- Returns:
- 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
-
withItem
-
build
Each time build() is called, a new instance of the theIntegrationObjectModelis returned with the same properties that were set.- Returns:
- IntegrationObjectModel
-
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
-