public class UnitTestContext
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static UnitTestContext |
createCurrentContext()
Creates context if its not there and returns it
|
static void |
destroyCurrentContext()
Destroys the context => releases all resources held in the context
|
boolean |
getBooleanProperty(java.lang.String propName) |
static UnitTestContext |
getCurrentContext()
Returns Integration Context
|
java.util.Date |
getDateProperty(java.lang.String propName)
Return proprty value for specified property as Date
|
java.lang.Double |
getDoubleProperty(java.lang.String propName)
Return proprty value for specified property as Double
|
java.lang.Integer |
getIntegerProperty(java.lang.String propName)
Return proprty value for specified property as Integer
|
java.lang.Long |
getLongProperty(java.lang.String propName)
Return proprty value for specified property as Long
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
returns Map of all context properties.
|
java.lang.Object |
getProperty(java.lang.String propName)
Return property value for specified property
|
java.lang.String |
getStringProperty(java.lang.String propName)
Return proprty value for specified property as string
|
void |
removeProperty(java.lang.String propName)
Removes property
propName . |
void |
setDoubleProperty(java.lang.String propName,
double val)
Sets property with double value
|
void |
setIntegerProperty(java.lang.String propName,
int val)
Sets property with integer value
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> data)
Sets properties from the list
|
void |
setProperty(java.lang.String propName,
java.lang.Object value)
Sets property with any value
|
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public java.lang.Object getProperty(java.lang.String propName)
propName
- property namepublic java.lang.String getStringProperty(java.lang.String propName)
propName
- property namepublic java.lang.Integer getIntegerProperty(java.lang.String propName)
propName
- property namepublic java.lang.Long getLongProperty(java.lang.String propName)
propName
- property namepublic void setIntegerProperty(java.lang.String propName, int val)
propName
- property nameval
- property valuepublic void setDoubleProperty(java.lang.String propName, double val)
propName
- property nameval
- property valuepublic java.lang.Double getDoubleProperty(java.lang.String propName)
propName
- property namepublic java.util.Date getDateProperty(java.lang.String propName)
propName
- property namepublic boolean getBooleanProperty(java.lang.String propName)
public void setProperty(java.lang.String propName, java.lang.Object value)
propName
- property nameval
- property valuepublic void removeProperty(java.lang.String propName)
propName
.propName
- name of the property.public void setProperties(java.util.Map<java.lang.String,java.lang.Object> data)
data
- set of properties for the context.public static UnitTestContext getCurrentContext()
public static UnitTestContext createCurrentContext()
public static void destroyCurrentContext()