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 ofModelService
:de.hybris.platform.servicelayer.interceptor.InterceptorTestModelService
.
This test service knows only a simpleInterceptorRegistry
, which is registered only for the purpose of this test. It maps only one testPrepareInterceptor
s for the types under test.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description InterceptorContextModelRegistrationTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
void
shouldCreateAndDeleteTheSameItemRegisteredForBothCreationAndDeletion()
void
shouldCreateNewModelRegisteredForSaveInRemoveInterceptor()
void
shouldRemoveExistingModelRegisteredForRemovalInPrepareInterceptor()
void
shouldSkipRegisteringMappingWithNoInterceptorWithoutException()
void
shouldUpdateExistingModelRegisteredForSaveInRemoveInterceptor()
void
tearDown()
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.-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getApplicationContext, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
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()
-
-