Class 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 Detail

      • InterceptorContextModelRegistrationTest

        public InterceptorContextModelRegistrationTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • tearDown

        public void tearDown()
                      throws java.lang.Exception
        Throws:
        java.lang.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()