Package de.hybris.platform.test
Class LocalizationFilesTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.test.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"
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description LocalizationFilesTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
isValidUTF8(byte[] bytes)
Checks if given byte array is correctly UTF-8 encoded.static void
setUp()
static void
tearDown()
void
testCorrectXmlUTF8Tag()
Tests if the XML-specific UTF-8 Tag is present.void
testEncodedInUTF8()
Checks if the file was formatted correctly in UTF-8.void
testIfWithoutByteOrderMark()
Tests if the property-files are Byte-Order-Mark-less because this could cause problems.void
testLocalizationFilesHaveCharsetByteOrderMark()
Test to determine if files have a Byte-Order-Mark and fails if they don't.void
testXmlNotUIConfigFile()
Tests if there are XML-files present.-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
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.
-
-