Class ComponentRollbackConverterTest

java.lang.Object
de.hybris.platform.cms2.version.converter.rollback.impl.ComponentRollbackConverterTest

@UnitTest public class ComponentRollbackConverterTest extends Object
  • Constructor Details

    • ComponentRollbackConverterTest

      public ComponentRollbackConverterTest()
  • Method Details

    • setUp

      public void setUp()
    • setUpVersionPayload

      protected void setUpVersionPayload()
    • setUpVersionedSlot

      protected void setUpVersionedSlot(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