Class InterceptorContextModelRegistrationTest

java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.interceptor.InterceptorContextModelRegistrationTest
All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class InterceptorContextModelRegistrationTest extends ServicelayerBaseTest
Tests PLA-10368.
Test uses test implementation of ModelService : de.hybris.platform.servicelayer.interceptor.InterceptorTestModelService.
This test service knows only a simple InterceptorRegistry, which is registered only for the purpose of this test. It maps only one test PrepareInterceptors for the types under test.
  • Constructor Details

    • InterceptorContextModelRegistrationTest

      public InterceptorContextModelRegistrationTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • tearDown

      public void tearDown() throws Exception
      Throws:
      Exception
    • testPersistModelsRegisteredInPrepareInterceptor

      public void testPersistModelsRegisteredInPrepareInterceptor()
      In the test scenario an order is created.
      Test interceptors mapping creates a new paymentAddress per each new model creation.
      Moreover, each new address triggers new Country creation via prepare interceptor.
      The test checks if every new model registered in the interceptor context is really persisted.
    • shouldCreateNewModelRegisteredForSaveInRemoveInterceptor

      public void shouldCreateNewModelRegisteredForSaveInRemoveInterceptor()
    • shouldUpdateExistingModelRegisteredForSaveInRemoveInterceptor

      public void shouldUpdateExistingModelRegisteredForSaveInRemoveInterceptor()
    • shouldRemoveExistingModelRegisteredForRemovalInPrepareInterceptor

      public void shouldRemoveExistingModelRegisteredForRemovalInPrepareInterceptor()
    • shouldCreateAndDeleteTheSameItemRegisteredForBothCreationAndDeletion

      public void shouldCreateAndDeleteTheSameItemRegisteredForBothCreationAndDeletion()
    • shouldSkipRegisteringMappingWithNoInterceptorWithoutException

      public void shouldSkipRegisteringMappingWithNoInterceptorWithoutException()