Package de.hybris.platform.test
Class LocalizationFilesTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.test.LocalizationFilesTest
- All Implemented Interfaces:
JaloSessionHolder
Tests different attributes of the localization-files. Following types of localization files are tested:
"*.properties", "*.xml" and "*.zul"
-
Field Summary
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidUTF8(byte[] bytes) Checks if given byte array is correctly UTF-8 encoded.static voidsetUp()static voidtearDown()voidTests if the XML-specific UTF-8 Tag is present.voidChecks if the file was formatted correctly in UTF-8.voidTests if the property-files are Byte-Order-Mark-less because this could cause problems.voidTest to determine if files have a Byte-Order-Mark and fails if they don't.voidTests if there are XML-files present.Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
LocalizationFilesTest
public LocalizationFilesTest()
-
-
Method Details
-
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.
-