|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--junit.extensions.ConfigurableTestCase
Base class for test cases which are configured using a configuration file instead of hardcoding test data in the fixture.
Field Summary | |
protected Configuration |
conf
Cached configuration. |
Constructor Summary | |
ConfigurableTestCase(java.lang.String name)
Creates instance of configurable test case. |
Method Summary | |
boolean |
getBoolean(java.lang.String key)
Retrieves boolean number from configuration. |
byte |
getByte(java.lang.String key)
Retrieves byte from configuration. |
char |
getChar(java.lang.String key)
Retrieves character from configuration. |
protected Configuration |
getConfiguration()
Retrieves configuration of this test case. |
double |
getDouble(java.lang.String key)
Retrieves double number from configuration. |
float |
getFloat(java.lang.String key)
Retrieves float number from configuration. |
int |
getInteger(java.lang.String key)
Retrieves integer number from configuration. |
long |
getLong(java.lang.String key)
Retrieves long number from configuration. |
short |
getShort(java.lang.String key)
Retrieves short number from configuration. |
java.lang.String |
getString(java.lang.String key)
Retrieves string from configuration. |
java.lang.String[] |
getStrings(java.lang.String key)
Retrieves array of strings from configuration. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface junit.framework.Test |
countTestCases, run |
Field Detail |
protected Configuration conf
Constructor Detail |
public ConfigurableTestCase(java.lang.String name)
name
- Name of this test case.Method Detail |
protected Configuration getConfiguration()
public boolean getBoolean(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getBoolean
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public byte getByte(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getByte
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public char getChar(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getChar
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public double getDouble(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getDouble
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public float getFloat(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getFloat
in interface ConfigurableTest
junit.extensions.ConfigurableTest
name
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public int getInteger(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getInteger
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public long getLong(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getLong
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public short getShort(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getShort
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public java.lang.String getString(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getString
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.public java.lang.String[] getStrings(java.lang.String key) throws java.lang.IllegalArgumentException
ConfigurableTest
getStrings
in interface ConfigurableTest
junit.extensions.ConfigurableTest
key
- Configuration parameter name.java.lang.IllegalArgumentException
- Parameter was not found or can't be retrieved.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |