Class BaseContext
- java.lang.Object
-
- org.junit.rules.ExternalResource
-
- de.hybris.platform.integrationservices.util.BaseContext
-
- All Implemented Interfaces:
org.junit.rules.TestRule
- Direct Known Subclasses:
IntegrationObjectItemsContext,IntegrationObjectsContext,RequestPersistenceContext
public abstract class BaseContext extends org.junit.rules.ExternalResourceThe base class to contexts to provide common functionality, such as setup and clean up after tests.
-
-
Constructor Summary
Constructors Constructor Description BaseContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbefore()protected <T extends ItemModel>
java.util.Collection<T>findAll(java.lang.Class<T> type)Retrieves all model items existing in the persistent storage.FlexibleSearchServiceflexibleSearch()protected <T> TgetService(java.lang.String name, java.lang.Class<T> type)ModelServicemodelService()protected <T extends ItemModel>
voidremoveAll(java.lang.Class<T> type)
-
-
-
Method Detail
-
getService
protected <T> T getService(java.lang.String name, java.lang.Class<T> type)
-
modelService
public ModelService modelService()
-
flexibleSearch
public FlexibleSearchService flexibleSearch()
-
before
public void before()
- Overrides:
beforein classorg.junit.rules.ExternalResource
-
removeAll
protected <T extends ItemModel> void removeAll(java.lang.Class<T> type)
-
findAll
protected <T extends ItemModel> java.util.Collection<T> findAll(java.lang.Class<T> type)
Retrieves all model items existing in the persistent storage.- Returns:
- a collection of all items or an empty collection, if there are no items in the persistent storage.
-
-