Class IntegrationObjectItemsContext
java.lang.Object
org.junit.rules.ExternalResource
de.hybris.platform.integrationservices.util.BaseContext
de.hybris.platform.integrationservices.util.IntegrationObjectItemsContext
- All Implemented Interfaces:
org.junit.rules.TestRule
A class to provide context or to modify context about
IntegrationObjectItems
existing in the system. It's meant to be used in integration tests to set up or verify test conditions.
This context should be used when the test doesn't care about associating the IntegrationObjectItems to
a specific IntegrationObject. This class will generate a random IntegrationObject and associates the
IntegrationObjectItems to it.-
Method Summary
Modifier and TypeMethodDescriptionvoidafter()voidbefore()create()Get theIntegrationObjectModelassociated to the givenIntegrationObjectItemModelsgivenExist(IntegrationObjectItemBuilder... specs) Associates the integration object item specifications to an internally generatedIntegrationObjectModel, and persists them in the context storage.voidgivenExist(IntegrationObjectItemModel... models) Associates the integration object items to an internally generatedIntegrationObjectModel, and persists them in the context storage.Methods inherited from class de.hybris.platform.integrationservices.util.BaseContext
findAll, flexibleSearch, getService, modelService, removeAllMethods inherited from class org.junit.rules.ExternalResource
apply
-
Method Details
-
create
-
before
public void before()- Overrides:
beforein classBaseContext
-
after
public void after()- Overrides:
afterin classorg.junit.rules.ExternalResource
-
givenExist
Associates the integration object item specifications to an internally generatedIntegrationObjectModel, and persists them in the context storage. UsegetIntegrationObject()to get the associated IntegrationObjectModel.- Parameters:
specs- specifications of theIntegrationObjectItemModelto create in the persistent storage.
-
givenExist
Associates the integration object items to an internally generatedIntegrationObjectModel, and persists them in the context storage. UsegetIntegrationObject()to get the associated IntegrationObjectModel.- Parameters:
models- models of theIntegrationObjectItemModelto create in the persistent storage.
-
getIntegrationObject
Get theIntegrationObjectModelassociated to the givenIntegrationObjectItemModels- Returns:
- IntegrationObjectModel with a random code
-