Class LocalizationFilesTest

  • All Implemented Interfaces:
    JaloSessionHolder

    @IntegrationTest
    public class LocalizationFilesTest
    extends HybrisJUnit4Test
    Tests different attributes of the localization-files. Following types of localization files are tested: "*.properties", "*.xml" and "*.zul"
    • Constructor Detail

      • LocalizationFilesTest

        public LocalizationFilesTest()
    • Method Detail

      • setUp

        public static void setUp()
      • tearDown

        public static void tearDown()
      • testEncodedInUTF8

        public void testEncodedInUTF8()
        Checks if the file was formatted correctly in UTF-8.
      • testCorrectXmlUTF8Tag

        public void testCorrectXmlUTF8Tag()
        Tests if the XML-specific UTF-8 Tag is present.
      • testXmlNotUIConfigFile

        public void testXmlNotUIConfigFile()
        Tests if there are XML-files present. At this time if there are XML-files within alllocalizationFiles, Jira Issue PLA-11692 counts as not resolved.
      • testIfWithoutByteOrderMark

        public void testIfWithoutByteOrderMark()
        Tests if the property-files are Byte-Order-Mark-less because this could cause problems. It fails if a file is detected with a BOM.
      • testLocalizationFilesHaveCharsetByteOrderMark

        public void testLocalizationFilesHaveCharsetByteOrderMark()
        Test to determine if files have a Byte-Order-Mark and fails if they don't. Adding a Byte-Order-Mark to all property-files has been discussed and dismissed, because it causes more problems than it solves. Therefore this test is deactivated.
      • isValidUTF8

        public static boolean isValidUTF8​(byte[] bytes)
        Checks if given byte array is correctly UTF-8 encoded.
        Parameters:
        bytes - That have been read from somewhere.
        Returns:
        true when valid UTF8 encoded.