Package core.helpers
Class LocalizationHelper
java.lang.Object
core.helpers.LocalizationHelper
local: in project directory web: in web config directory mobile: in mobile
config directory
- Author:
- Ehsan Matean
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColumnHeaders(org.apache.commons.csv.CSVParser parser) gets the list of the column in csv filestatic FilegetCsvFile(String filename) jsonFileToMap(String filePath) jsonStringToMap(String jsonString) static voidloads the content of the csv filestatic voidlocalizationLoadJson(String fileName) loads localization map from a json file to the test object datastatic voidlocalizationSetupCsv(String language) sets the language for csv localization filestatic Stringstatic StringlocalizeFromCsv(String value) static StringlocalizeFromJson(String key) gets local language from json file specified in properties file
-
Field Details
-
DEFAULT_LOCAL
-
LOCALIZATION_PATH
-
-
Constructor Details
-
LocalizationHelper
public LocalizationHelper()
-
-
Method Details
-
localize
-
localizeFromCsv
-
localizationSetupCsv
sets the language for csv localization file- Parameters:
language-
-
localizeFromJson
gets local language from json file specified in properties file- Parameters:
key-- Returns:
-
localizationLoadJson
loads localization map from a json file to the test object data- Parameters:
fileName-
-
jsonStringToMap
-
jsonFileToMap
-
loadCsvFileContent
public static void loadCsvFileContent()loads the content of the csv file- Throws:
Exception
-
getColumnHeaders
gets the list of the column in csv file- Parameters:
parser-- Returns:
-
getCsvFile
-