Class DefaultCMSItemConverterTest

java.lang.Object
de.hybris.platform.cmsfacades.cmsitems.converter.DefaultCMSItemConverterTest

@UnitTest public class DefaultCMSItemConverterTest extends Object
  • Constructor Details

    • DefaultCMSItemConverterTest

      public DefaultCMSItemConverterTest()
  • Method Details

    • setUp

      public void setUp()
    • shouldFailConvertWhenItemModelIsNull

      public void shouldFailConvertWhenItemModelIsNull()
    • shouldFailConvertWhenMapIsNull

      public void shouldFailConvertWhenMapIsNull() throws InstantiationException, IllegalAccessException
      Throws:
      InstantiationException
      IllegalAccessException
    • shouldFailConvertWhenMapHasNoType

      public void shouldFailConvertWhenMapHasNoType() throws InstantiationException, IllegalAccessException
      Throws:
      InstantiationException
      IllegalAccessException
    • shouldFindModificationForSimpleAttributeType

      public void shouldFindModificationForSimpleAttributeType()
    • shouldFindModificationForComplexAttributeType

      public void shouldFindModificationForComplexAttributeType()
    • shouldNotFindModificationForUidAttribute

      public void shouldNotFindModificationForUidAttribute()
    • shouldNotInitializeCloneComponentAttributeContextForNonComponentCloningFlow

      public void shouldNotInitializeCloneComponentAttributeContextForNonComponentCloningFlow()
    • shouldCloneComponentFromRepresentation

      public void shouldCloneComponentFromRepresentation() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldNotCloneComponentFromRepresentationWithSessionAlreadyInitialized

      public void shouldNotCloneComponentFromRepresentationWithSessionAlreadyInitialized() throws CMSItemNotFoundException
      Throws:
      CMSItemNotFoundException
    • shouldGetItemModelFromCloneComponentRepresentation

      public void shouldGetItemModelFromCloneComponentRepresentation()
    • shouldCreateItemModelFromRepresentation

      public void shouldCreateItemModelFromRepresentation()
    • isCloneComponentFlowShouldReturnFalseForNonCloneableComponents

      public void isCloneComponentFlowShouldReturnFalseForNonCloneableComponents()
    • isCloneComponentFlowShouldReturnTrueForCloneableComponents

      public void isCloneComponentFlowShouldReturnTrueForCloneableComponents()
    • isDynamicAttributeShouldReturnTrueForDynamicAttributes

      public void isDynamicAttributeShouldReturnTrueForDynamicAttributes()
    • isDynamicAttributeShouldReturnFalseForNonDynamicAttributes

      public void isDynamicAttributeShouldReturnFalseForNonDynamicAttributes()
    • isDynamicAttributeShouldReturnFalseForRelationAttributes

      public void isDynamicAttributeShouldReturnFalseForRelationAttributes()
    • convertAndValidateShouldReturnAPopulatedItemModel

      public void convertAndValidateShouldReturnAPopulatedItemModel()
    • convertAndValidateShouldNotPopulateNonWritableAttributes

      public void convertAndValidateShouldNotPopulateNonWritableAttributes()
    • convertAndValidateShouldSkipAttributesWithNoReadPermissions

      public void convertAndValidateShouldSkipAttributesWithNoReadPermissions()
    • convertAndValidateShouldSkipAttributesWithNoWritePermissions

      public void convertAndValidateShouldSkipAttributesWithNoWritePermissions()
    • convertAndValidateShouldSkipComposedTypeAttributesWithNoChangePermissionForContainingType

      public void convertAndValidateShouldSkipComposedTypeAttributesWithNoChangePermissionForContainingType()
    • convertAndValidateShouldNotPopulateDynamicAttributes

      public void convertAndValidateShouldNotPopulateDynamicAttributes()
    • convertAndValidateShouldCatchAttributeValidationErrorsAndCollectThem

      public void convertAndValidateShouldCatchAttributeValidationErrorsAndCollectThem()
    • buildTestDataMap

      protected Map<String,Object> buildTestDataMap()
    • setUpAttributeDescriptorWithDefaultValues

      protected void setUpAttributeDescriptorWithDefaultValues(AttributeDescriptorModel attr, String qualifier)
    • setUpDataToModelTest

      protected void setUpDataToModelTest(Map<String,Object> testMap)
    • makeAttributeNonWritable

      protected void makeAttributeNonWritable(AttributeDescriptorModel attr)
    • denyChangePermissionToPrincipal

      protected void denyChangePermissionToPrincipal(String typeCode, String qualifier)
    • denyReadPermissionToPrincipal

      protected void denyReadPermissionToPrincipal(String typeCode, String qualifier)
    • makeAttributeDynamic

      protected void makeAttributeDynamic(AttributeDescriptorModel attr)
    • makeAttributeThrowExceptionWhenValidated

      protected <T extends RuntimeException> void makeAttributeThrowExceptionWhenValidated(AttributeDescriptorModel attr, Class<T> expectedExceptionClass)
    • assertValuesFromMapWereSetInModel

      protected void assertValuesFromMapWereSetInModel(Map<String,Object> originalMap, String... expectedValues)
    • assertCloneProviderWasHandled

      protected void assertCloneProviderWasHandled(ItemModel itemModel)