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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidCheck that all UnitSystems have valid a nameKey and a valid abbreviationKey and test those keys in all available localizations.(package private) static StringReplace unicode escapes by the corresponding character.voidVerify 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- 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
-