|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--com.netriser.xmltestsuite.TestResource
Superclass for resource objects. Resource objects provide resources to the test classes. They are singletons which are created once, even if a set of tests are run multiple times (e.g. through the junit gui application)
Provides initialisation placeholders setUptearDown to ensure compatibility with junit.
Provides logging facilities: verbose(), debug()
To implement a new resource,
To integrate an existing class into this sytem which already has a superclass, instead of extending from this class, modify the existing class to implement TestResourceInterface
Constructor Summary | |
TestResource()
|
Method Summary | |
static void |
debug(java.lang.String str)
Prints str to System.err if debug flag is set |
static boolean |
getDebugMode()
|
static boolean |
getVerboseMode()
|
static void |
setDebug(boolean b)
|
abstract void |
setUp()
Setup the resource before the tests are run |
static void |
setVerbose(boolean b)
|
abstract void |
tearDown()
Tidy up the resource after the tests are run |
void |
useTestResult(junit.framework.TestResult resultCollector)
Called when testing starts ie by Main::RunTest Provides opportunity to calll TestResult::addListener addListener requires class to implement TestListener interface |
static void |
verbose(java.lang.String str)
Prints str to System.err if verbose flag is set |
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 |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TestResource()
Method Detail |
public abstract void setUp()
setUp
in interface TestResourceInterface
TestResourceInterface.setUp()
public abstract void tearDown()
tearDown
in interface TestResourceInterface
TestResourceInterface.tearDown()
public void useTestResult(junit.framework.TestResult resultCollector)
TestResourceInterface
useTestResult
in interface TestResourceInterface
resultCollector
- TestResourceInterface.useTestResult(TestResult)
public static void debug(java.lang.String str)
public static void setDebug(boolean b)
public static boolean getDebugMode()
public static void verbose(java.lang.String str)
public static void setVerbose(boolean b)
public static boolean getVerboseMode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |