Class DefaultCommerceCartMergingStrategyTest
- java.lang.Object
-
- de.hybris.platform.commerceservices.order.impl.DefaultCommerceCartMergingStrategyTest
-
@UnitTest public class DefaultCommerceCartMergingStrategyTest extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description org.junit.rules.ExpectedExceptionthrown
-
Constructor Summary
Constructors Constructor Description DefaultCommerceCartMergingStrategyTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidshouldAddClonedEntryToCartAndResolveEntryNumberConflictsIfThereIsNoEntryToMerge()voidshouldCheckThatTheCartsAreDistinct()voidshouldCheckTheModificationListIsNotNull()voidshouldCheckTheSourceCartIsNotNull()voidshouldCheckTheTargetCartIsNotNull()voidshouldCopyEntryGroupsWhenToCartEntryGroupsIsEmpty()voidshouldCopyEntryGroupsWhenToCartEntryGroupsIsNotEmpty()voidshouldFromCartSiteEqualWithCurrentSite()voidshouldInvokeUpdateQuantityForCartEntryIfThereIsEntryToMerge()voidshouldMergeEntriesIfThereIsEntryToMerge()voidshouldNotCopyEntryGroupsWhenFromCartEntryGroupsIsEmpty()voidshouldNotMergeForAnonymousUser()voidshouldNotMergeForNullUser()voidshouldReindexEntriesAlongWithGroups()voidshouldRemoveTheFromCart()voidshouldResolveEntryGroupNumberConflicts()voidshouldSaveTheToCart()voidshouldToCartSiteEqualWithCurrentSite()
-
-
-
Method Detail
-
setUp
public void setUp() throws CommerceCartModificationException
-
shouldNotMergeForAnonymousUser
public void shouldNotMergeForAnonymousUser() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldNotMergeForNullUser
public void shouldNotMergeForNullUser() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldCheckTheSourceCartIsNotNull
public void shouldCheckTheSourceCartIsNotNull() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldCheckTheTargetCartIsNotNull
public void shouldCheckTheTargetCartIsNotNull() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldCheckTheModificationListIsNotNull
public void shouldCheckTheModificationListIsNotNull() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldToCartSiteEqualWithCurrentSite
public void shouldToCartSiteEqualWithCurrentSite() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldFromCartSiteEqualWithCurrentSite
public void shouldFromCartSiteEqualWithCurrentSite() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldCheckThatTheCartsAreDistinct
public void shouldCheckThatTheCartsAreDistinct() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldSaveTheToCart
public void shouldSaveTheToCart() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldRemoveTheFromCart
public void shouldRemoveTheFromCart() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldInvokeUpdateQuantityForCartEntryIfThereIsEntryToMerge
public void shouldInvokeUpdateQuantityForCartEntryIfThereIsEntryToMerge() throws CommerceCartMergingException, CommerceCartModificationException
-
shouldMergeEntriesIfThereIsEntryToMerge
public void shouldMergeEntriesIfThereIsEntryToMerge() throws CommerceCartMergingException, CommerceCartModificationException
-
shouldAddClonedEntryToCartAndResolveEntryNumberConflictsIfThereIsNoEntryToMerge
public void shouldAddClonedEntryToCartAndResolveEntryNumberConflictsIfThereIsNoEntryToMerge() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldCopyEntryGroupsWhenToCartEntryGroupsIsEmpty
public void shouldCopyEntryGroupsWhenToCartEntryGroupsIsEmpty() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldCopyEntryGroupsWhenToCartEntryGroupsIsNotEmpty
public void shouldCopyEntryGroupsWhenToCartEntryGroupsIsNotEmpty() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldNotCopyEntryGroupsWhenFromCartEntryGroupsIsEmpty
public void shouldNotCopyEntryGroupsWhenFromCartEntryGroupsIsEmpty() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldResolveEntryGroupNumberConflicts
public void shouldResolveEntryGroupNumberConflicts() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
shouldReindexEntriesAlongWithGroups
public void shouldReindexEntriesAlongWithGroups() throws CommerceCartMergingException- Throws:
CommerceCartMergingException
-
-