| org.ozoneDB.test.OzoneTestCase
All known Subclasses: org.ozoneDB.test.tx.LockTest, org.ozoneDB.test.args.ArgsTest, org.ozoneDB.test.simple.SimpleTest, org.ozoneDB.test.tx.TxTest,
OzoneTestCase | abstract public class OzoneTestCase extends TestCase (Code) | | Base class for the Ozone based TestCase. The following is an
example of writting 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!!!
}
}
author: SMB author: David Li version: $Revision: 1.1 $Date: 2001/12/18 10:31:31 $ |
OzoneTestCase | protected OzoneTestCase(String name)(Code) | | Constructor.
|
db | public ExternalDatabase db()(Code) | | Return the database set up by OzoneTestRunner
a instance of ExternalDatabase |
setDB | public void setDB(ExternalDatabase db)(Code) | | Set the database for this TestCase. This is typically used by
the OzoneTestRunner. However, you can also use it in the
setUp() method to connect to different database than the one
specified by the OzoneTestRunner.
Parameters: db - the database to be used for the TestCase |
|
|