public class Config extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
RESOURCE_PATH |
| Constructor and Description |
|---|
Config() |
| Modifier and Type | Method and Description |
|---|---|
static void |
getAllFiles(File curDir)
git all files in given directory
|
static Map<String,String> |
getAllKeys(String path)
get all key values from property files in directory at path
Fails if duplicate key exists.
|
static Boolean |
getBooleanValue(String key)
gets boolean value from properties key
|
static Boolean |
getBooleanValue(String key,
boolean isFailable)
gets boolean value from properties key
|
static double |
getDoubleValue(String key)
gets double value from properties key
|
static double |
getDoubleValue(String key,
boolean isFailable)
gets double value from properties key
|
static int |
getIntValue(String key)
gets int value from properties key
|
static int |
getIntValue(String key,
boolean isFailable)
gets int value from properties key
|
static Object |
getObjectValue(String key)
gets the object value from property key
|
static String |
getValue(String key)
returns config value
|
static String |
getValue(String key,
boolean isFailable)
returns config value
|
static List<String> |
getValueList(String key)
returns a list from config value values separated by ","
|
static List<String> |
getValueList(String key,
boolean isFailable)
returns a list from config value values separated by ","
|
static void |
loadConfig(String testId)
loads config And properties files to TestObject config map
|
static Map<String,Object> |
loadConfigProperties()
loads config And properties files to TestObject config map
|
static void |
putValue(String key,
Object value)
puts key value pair in config
|
static void |
putValue(String key,
Object value,
String info) |
public static String RESOURCE_PATH
public static void getAllFiles(File curDir)
curDir - target directorypublic static Map<String,String> getAllKeys(String path)
path - path to proeprties filepublic static void loadConfig(String testId)
testId - id of the testpublic static Map<String,Object> loadConfigProperties()
testId - id of the testpublic static String getValue(String key)
key - get string value of key from propertiespublic static String getValue(String key, boolean isFailable)
key - get string value of key from propertiespublic static Boolean getBooleanValue(String key)
key - target key from properties filepublic static Boolean getBooleanValue(String key, boolean isFailable)
key - target key from properties filepublic static Object getObjectValue(String key)
key - key in properties filepublic static int getIntValue(String key)
key - key in properties filepublic static int getIntValue(String key, boolean isFailable)
key - key in properties filepublic static double getDoubleValue(String key)
key - key in properties filepublic static double getDoubleValue(String key, boolean isFailable)
key - key in properties filepublic static List<String> getValueList(String key)
key - key in properties filepublic static List<String> getValueList(String key, boolean isFailable)
key - key in properties filepublic static void putValue(String key, Object value)
key - key in properties filevalue - value associated with keyCopyright © 2019. All rights reserved.