Class ComponentRollbackConverterTest
- java.lang.Object
-
- de.hybris.platform.cms2.version.converter.rollback.impl.ComponentRollbackConverterTest
-
@UnitTest public class ComponentRollbackConverterTest extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ComponentRollbackConverterTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgivenComponentCannotBeVersioned_WhenRollbackItemIsCalled_ThenItThrowsAnItemRollbackException()voidgivenComponentNotVersionedWithPage_WhenRollbackItemIsCalled_ThenItReturnsTheOriginalComponent()voidgivenNonSharedComponent_WhenRollbackItemIsCalled_ThenItAddsTheCloneAndRemovesTheSharedSlotsFromThePayload()voidgivenNonSharedComponent_WhenRollbackItemIsCalled_ThenItRollbacksTheComponentOnlyForTheCurrentPage()voidgivenNonSharedComponent_WhenRollbackItemIsCalled_ThenItUpdatesThePayloadToRemoveAnyExternalSlot()voidgivenSharedComponent_WhenRollbackItemIsCalled_ThenItReplacesTheComponentWithACloneInTheCurrentPage()voidsetUp()protected voidsetUpVersionedSlot(java.lang.String slotUid, ItemModel versionedSlot)protected voidsetUpVersionPayload()
-
-
-
Method Detail
-
setUp
public void setUp()
-
setUpVersionPayload
protected void setUpVersionPayload()
-
setUpVersionedSlot
protected void setUpVersionedSlot(java.lang.String slotUid, ItemModel versionedSlot)
-
givenComponentCannotBeVersioned_WhenRollbackItemIsCalled_ThenItThrowsAnItemRollbackException
public void givenComponentCannotBeVersioned_WhenRollbackItemIsCalled_ThenItThrowsAnItemRollbackException() throws ItemRollbackException- Throws:
ItemRollbackException
-
givenComponentNotVersionedWithPage_WhenRollbackItemIsCalled_ThenItReturnsTheOriginalComponent
public void givenComponentNotVersionedWithPage_WhenRollbackItemIsCalled_ThenItReturnsTheOriginalComponent() throws ItemRollbackException- Throws:
ItemRollbackException
-
givenNonSharedComponent_WhenRollbackItemIsCalled_ThenItRollbacksTheComponentOnlyForTheCurrentPage
public void givenNonSharedComponent_WhenRollbackItemIsCalled_ThenItRollbacksTheComponentOnlyForTheCurrentPage() throws ItemRollbackException- Throws:
ItemRollbackException
-
givenNonSharedComponent_WhenRollbackItemIsCalled_ThenItUpdatesThePayloadToRemoveAnyExternalSlot
public void givenNonSharedComponent_WhenRollbackItemIsCalled_ThenItUpdatesThePayloadToRemoveAnyExternalSlot() throws ItemRollbackException- Throws:
ItemRollbackException
-
givenSharedComponent_WhenRollbackItemIsCalled_ThenItReplacesTheComponentWithACloneInTheCurrentPage
public void givenSharedComponent_WhenRollbackItemIsCalled_ThenItReplacesTheComponentWithACloneInTheCurrentPage() throws ItemRollbackException- Throws:
ItemRollbackException
-
givenNonSharedComponent_WhenRollbackItemIsCalled_ThenItAddsTheCloneAndRemovesTheSharedSlotsFromThePayload
public void givenNonSharedComponent_WhenRollbackItemIsCalled_ThenItAddsTheCloneAndRemovesTheSharedSlotsFromThePayload() throws ItemRollbackException- Throws:
ItemRollbackException
-
-