Class ComponentRollbackConverterTest


  • @UnitTest
    public class ComponentRollbackConverterTest
    extends java.lang.Object
    • Constructor Detail

      • ComponentRollbackConverterTest

        public ComponentRollbackConverterTest()
    • 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