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
public class IntegrationObjectItemsContext extends BaseContext
A class to provide context or to modify context aboutIntegrationObjectItems 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafter()voidbefore()static IntegrationObjectItemsContextcreate()IntegrationObjectModelgetIntegrationObject()Get theIntegrationObjectModelassociated to the givenIntegrationObjectItemModelsIntegrationObjectItemModel[]givenExist(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, removeAll
-
-
-
-
Method Detail
-
create
public static IntegrationObjectItemsContext create()
-
before
public void before()
- Overrides:
beforein classBaseContext
-
after
public void after()
- Overrides:
afterin classorg.junit.rules.ExternalResource
-
givenExist
public IntegrationObjectItemModel[] givenExist(IntegrationObjectItemBuilder... specs)
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
public void givenExist(IntegrationObjectItemModel... models)
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
public IntegrationObjectModel getIntegrationObject()
Get theIntegrationObjectModelassociated to the givenIntegrationObjectItemModels- Returns:
- IntegrationObjectModel with a random code
-
-