@UnitTest public class InterceptorRegistryTest extends java.lang.Object
| Constructor and Description |
|---|
InterceptorRegistryTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
setUp()
Using own DefaultInterceptorRegistry.
|
void |
testOrderedUnitPrepareInterceptors()
GIVEN:
added in the following order: AAA PrepareInterceptor, order=10, type=unit BBB PrepareInterceptor, default order, type=unit CCC PrepareInterceptor, order=1, type=unit THEN: lowest order number first registry.getPrepareInterceptors() returns in this order: CCC, AAA, BBB |
void |
testRegister()
typecode test.
|
void |
testRegisterOrdered()
GIVEN:
added in the following order: 1: TestLoadInterceptor, order=50, type=product 2: TestLoadInterceptor, order=500, type=item 3: TestLoadInterceptor, order=5, type=product 4: TestLoadInterceptor, defaultorder, type=unit 5: TestLoadInterceptor, order=5, type=unit 6: TestLoadInterceptor, defaultorder, type=item 7: TestLoadInterceptor, order=4, type=unit, replacing 6 8: TestLoadInterceptor, order=30, type=item THEN: lowest order number first registry.getLoadInterceptors("Product") returns: 3, 8, 1, 2, 6 registry.getLoadInterceptors("Unit") returns: 7, 5, 8, 2, 4 |
void |
testRegisterWithReplacement()
GIVEN:
added in the following order: TestLoadInterceptor, default order, type=item TestLoadInterceptor, default order, type=product, replacing the item TestLoadInterceptor THEN: lowest order number first registry.getLoadInterceptors("Item") returns only one TestLoadInterceptor - for item registry.getLoadInterceptors("Product") returns only one TestLoadInterceptor - for product only, the item loadinterceptor was replaced registry.getPrepareInterceptors("Product") returns nothing, no prepare was registered here |
public void setUp()
public void testRegister()
public void testRegisterOrdered()
public void testRegisterWithReplacement()
public void testOrderedUnitPrepareInterceptors()
Copyright © 2018 SAP SE. All Rights Reserved.