Class DefaultCMSItemConverterSemiIntegrationTest

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

@UnitTest public class DefaultCMSItemConverterSemiIntegrationTest extends Object
  • Constructor Details

    • DefaultCMSItemConverterSemiIntegrationTest

      public DefaultCMSItemConverterSemiIntegrationTest()
  • Method Details

    • setup

      public void setup() throws IllegalAccessException, InstantiationException
      Test data structure:
      1. qualifier0 - standard uuid
      2. qualifier1 - partOf attribute
      3. qualifier2 - localized attribute
      4. qualifier3 - localized partOf attribute
      5. qualifier4 - collection of uuids
      6. qualifier5 - collection of partOf attribute
      7. qualifier6 - localized collection of uuids
      8. qualifier7 - localized collection of partOf attribute
      9. qualifier8 - collection of Map<String, String> attributes
      10. qualifier_not_writable - non writable attribute
      11. qualifier_dynamic - dynamic attribute (not stored in database) -- only read, never written
      Throws:
      IllegalAccessException
      InstantiationException
    • setupMockData

      protected void setupMockData()
    • setupMockIsCollection

      protected void setupMockIsCollection(AttributeDescriptorModel attributeDescriptor, boolean isCollection)
    • shouldConvertItemContainingAllCombinationsOfLocalizedCollectionAndPartOf

      public void shouldConvertItemContainingAllCombinationsOfLocalizedCollectionAndPartOf() throws IOException
      Throws:
      IOException
    • shouldNotPopulateAttributesWithoutReadPermission

      public void shouldNotPopulateAttributesWithoutReadPermission() throws IOException
      Throws:
      IOException
    • shouldOnlyPopulateLanguagesWithReadPermission

      public void shouldOnlyPopulateLanguagesWithReadPermission()
    • shouldNotPopulateAttributesWithoutReadTypePermission

      public void shouldNotPopulateAttributesWithoutReadTypePermission() throws IOException
      Throws:
      IOException
    • shouldConvertItemModelToNullWhenAttributeContentConverterReturnsNull

      public void shouldConvertItemModelToNullWhenAttributeContentConverterReturnsNull()
    • shouldConvertItemModelToNullWhenAttributeContentConverterNotFound

      public void shouldConvertItemModelToNullWhenAttributeContentConverterNotFound()
    • shouldConvertMapContainingAllCombinationsOfLocalizedCollectionAndPartOf

      public void shouldConvertMapContainingAllCombinationsOfLocalizedCollectionAndPartOf() throws IOException
      Throws:
      IOException
    • givenUserHasWritePermissionToSomeLanguages_WhenConvertingFromMapToModel_ThenItShouldConvertAllValuesButIgnoreLanguagesWithoutWritePermission

      public void givenUserHasWritePermissionToSomeLanguages_WhenConvertingFromMapToModel_ThenItShouldConvertAllValuesButIgnoreLanguagesWithoutWritePermission() throws IOException
      Throws:
      IOException
    • getItemData

      protected ItemData getItemData(String itemId)
    • readJsonFromFile

      protected Map<String,Object> readJsonFromFile() throws IOException
      Throws:
      IOException
    • mockLanguages

      protected void mockLanguages()
    • mockBlacklistedTypes

      protected void mockBlacklistedTypes()
    • mockNestedOrPartOfAttributePredicates

      protected void mockNestedOrPartOfAttributePredicates()
    • mockTypeModels

      protected void mockTypeModels()
    • mockPartOfQualifier

      protected void mockPartOfQualifier()
    • mockValidationServiceAndErrors

      protected void mockValidationServiceAndErrors()
    • mockUniqueItemIdentifierServiceAndPopulator

      protected void mockUniqueItemIdentifierServiceAndPopulator()
    • denyReadPermissionToPrincipal

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

      protected void denyReadTypePermissionToPrincipal(AttributeDescriptorModel attributeDescriptorModel, String permissionName)