Package org.djunits.locale
Class VerifyLocalizations
java.lang.Object
org.djunits.locale.VerifyLocalizations
Verify that all localizations contain all keys.
- Author:
- Peter Knoppers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Check that all UnitSystems have valid a nameKey and a valid abbreviationKey and test those keys in all available localizations.(package private) static String
Replace unicode escapes by the corresponding character.void
Verify that all localizations have the same set of keys as the localeunit.properties file and check that a string using each of the acceptable unit names is correctly parsed.
-
Constructor Details
-
VerifyLocalizations
public VerifyLocalizations()
-
-
Method Details
-
fixUnicodeEscapes
Replace unicode escapes by the corresponding character. Based on https://stackoverflow.com/questions/37502058/replace-unicode-escapes-with-the-corresponding-character- Parameters:
in
- String; the input string to process- Returns:
- String the processed input string
-
verifyLocalizations
@Test public void verifyLocalizations() throws IOException, ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, URISyntaxExceptionVerify that all localizations have the same set of keys as the localeunit.properties file and check that a string using each of the acceptable unit names is correctly parsed.- Throws:
IOException
- when a file could not be readClassNotFoundException
- ...SecurityException
- ...NoSuchMethodException
- ...InvocationTargetException
- ...IllegalArgumentException
- ...IllegalAccessException
- ...URISyntaxException
- ...
-
checkUnitSystemsLocale
Check that all UnitSystems have valid a nameKey and a valid abbreviationKey and test those keys in all available localizations.- Throws:
URISyntaxException
- on error
-