|
ozone core API | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
AllTestSuite | This TestSuite covers all the Unitest in this directory. |
OzoneTestCase | Base class for the Ozone based TestCase. |
OzoneTestRunner | OzoneTestRunner is the JUnit test runner for Ozone environment. |
OzoneTestSuiteLoader | This is a TestSuiteLoader for Ozone's database. |
This package provide the JUnit test framework for Ozone. This version is compatible with JUnit 3.6.
OzoneTestCase is the base for all Ozone TestCase. It includes access to the database setup by the TestRunner.
The following is an example for to write a OzoneTestCase.
packge com.foo; import junit.framework.*; import org.ozoneDB.test.OzoneTestCase; import org.ozoneDB.test.simple.*; package FooTestCase extends OzoneTestCase { public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(FooTestCase.class); return suite; } public void testCreate() { // db() provide the access to database setup by TestRunner Auto auto = (Auto)db().createObject(AutoImpl.class.getName()); assertNotNull(auto); // Test away!!! } }
Once you have the TestCase written, you will want to run the Test. OzoneTestRunner provides the environment to run Unit Test for Ozone.
Usage: ojvm org.ozoneDB.test.OzoneTestRunner {-local | -remote [-host=HOST] [-port=PORT]} [-debug]
Note: The OzoneTestRunner's logging is control by Log4J. You can use the log4j in your TestCase.
|
ozone core API | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |