public class MockNinjaProperties extends Object implements NinjaProperties
CONF_FILE_LOCATION_BY_CONVENTION, NINJA_EXTERNAL_CONF| Constructor and Description |
|---|
MockNinjaProperties(String mode,
org.apache.commons.configuration.Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
static MockNinjaProperties |
create(String... args)
Create a mock ninja properties, with the given args as the properties.
|
static MockNinjaProperties |
createWithMode(String mode,
String... args)
Create a mock ninja properties, with the given args as the properties.
|
String |
get(String key) |
Properties |
getAllCurrentNinjaProperties() |
Boolean |
getBoolean(String key) |
Boolean |
getBooleanOrDie(String key) |
Boolean |
getBooleanWithDefault(String key,
Boolean defaultValue) |
Integer |
getInteger(String key) |
Integer |
getIntegerOrDie(String key) |
Integer |
getIntegerWithDefault(String key,
Integer defaultValue) |
String |
getOrDie(String key) |
String[] |
getStringArray(String key) |
String |
getWithDefault(String key,
String defaultValue) |
boolean |
isDev() |
boolean |
isProd() |
boolean |
isTest() |
public MockNinjaProperties(String mode, org.apache.commons.configuration.Configuration configuration)
public static MockNinjaProperties create(String... args)
args - The key value pairs.AssertionError - If an odd number of arguments is supplied.public static MockNinjaProperties createWithMode(String mode, String... args)
mode - The modeargs - The key value pairs.AssertionError - If an odd number of arguments is supplied.public String get(String key)
get in interface NinjaPropertiespublic String getOrDie(String key)
getOrDie in interface NinjaPropertiespublic Integer getInteger(String key)
getInteger in interface NinjaPropertiespublic Integer getIntegerOrDie(String key)
getIntegerOrDie in interface NinjaPropertiespublic Boolean getBooleanOrDie(String key)
getBooleanOrDie in interface NinjaPropertiespublic Boolean getBoolean(String key)
getBoolean in interface NinjaPropertiespublic boolean isDev()
isDev in interface NinjaPropertiespublic boolean isTest()
isTest in interface NinjaPropertiespublic boolean isProd()
isProd in interface NinjaPropertiespublic Properties getAllCurrentNinjaProperties()
getAllCurrentNinjaProperties in interface NinjaPropertiespublic String[] getStringArray(String key)
getStringArray in interface NinjaPropertiespublic String getWithDefault(String key, String defaultValue)
getWithDefault in interface NinjaPropertiespublic Integer getIntegerWithDefault(String key, Integer defaultValue)
getIntegerWithDefault in interface NinjaPropertiespublic Boolean getBooleanWithDefault(String key, Boolean defaultValue)
getBooleanWithDefault in interface NinjaPropertiesCopyright © 2014. All Rights Reserved.