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.ExternalResource
The base class to contexts to provide common functionality, such as setup and clean up after tests.
  • Constructor Details

    • BaseContext

      public BaseContext()
  • Method Details

    • getService

      protected <T> T getService(String name, Class<T> type)
    • modelService

      public ModelService modelService()
    • flexibleSearch

      public FlexibleSearchService flexibleSearch()
    • before

      public void before()
      Overrides:
      before in class org.junit.rules.ExternalResource
    • removeAll

      protected <T extends ItemModel> void removeAll(Class<T> type)
    • findAll

      protected <T extends ItemModel> Collection<T> findAll(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.