@ThreadSafe public class LocalConfig extends Object
Config.ConfigProperty. Local configuration is really composed of the global SeLionConfig values as well as property
value "updates" made for each local configuration instance. Local configuration property values over-ride the
corresponding global SeLionConfig property value.
A local configuration supports configuration via parameters that are in the testng "test" tag scope over-riding
parameters values in suite scope.
Map<ConfigProperty, String> localValues = new HashMap<ConfigProperty, String>(); LocalConfig localConfig = new LocalConfig(localValues);See
Config.ConfigProperty for the configuration properties that are supported and their initial default
values. Some configuration properties are global only in scope and cannot be specified in a local configuration.
These properties must be specified globally using Config.| Constructor and Description |
|---|
LocalConfig()
Constructs a new instance of this class.
|
LocalConfig(Config.ConfigProperty configProperty,
String value)
Constructs a new instance of this class with the specified initial value.
|
LocalConfig(Map<Config.ConfigProperty,String> initialValues)
Constructs a new instance of this class from the specified initial values.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBooleanConfigProperty(Config.ConfigProperty configProperty) |
String |
getConfigProperty(Config.ConfigProperty configProperty)
Get the configuration property value for configProperty.
|
int |
getIntConfigProperty(Config.ConfigProperty configProperty) |
List<Object> |
getListConfigProperty(Config.ConfigProperty configProperty) |
Map<String,String> |
getLocalConfigValues()
Returns only the local configuration values associated with the Local Config.
|
boolean |
isLocalValuePresent(Config.ConfigProperty configProperty)
Answer if local configuration contains a value for specified property.
|
void |
printConfigValues(String testName)
Prints the configuration values associated with the LocalConfig.
|
void |
setConfigProperty(Config.ConfigProperty configProperty,
Object configPropertyValue)
Sets the SeLion configuration property value.
|
public LocalConfig()
public LocalConfig(Config.ConfigProperty configProperty, String value)
configProperty - Config.ConfigProperty The ConfigProperty to set in the local configuration.value - String The configuration property value to set.public LocalConfig(Map<Config.ConfigProperty,String> initialValues)
initialValues - Map The initial MAP of ConfigProperty values used to create the local configuration.public String getConfigProperty(Config.ConfigProperty configProperty)
configProperty - The configuration property value to getpublic List<Object> getListConfigProperty(Config.ConfigProperty configProperty)
public int getIntConfigProperty(Config.ConfigProperty configProperty)
public boolean getBooleanConfigProperty(Config.ConfigProperty configProperty)
public void setConfigProperty(Config.ConfigProperty configProperty, Object configPropertyValue)
configProperty - The configuration property to set.configPropertyValue - The configuration property value to set.public void printConfigValues(String testName)
testName - The <test> to which this configuration pertains to.public Map<String,String> getLocalConfigValues()
public boolean isLocalValuePresent(Config.ConfigProperty configProperty)
Copyright © 2016 PayPal Open Source. All rights reserved.