Expresso 5-6

com.jcorporate.expresso.core.utility
Class DBToolTests

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.jcorporate.expresso.services.test.ExpressoTestCase
              extended bycom.jcorporate.expresso.core.utility.DBToolTests
All Implemented Interfaces:
junit.framework.Test

public class DBToolTests
extends ExpressoTestCase

What this does:

Runs DBCreate on the schemas and makes sure that no exceptions are thrown while creating.

NOTE: Derive a class from this class to test all derived schemas.

Author:
Michael Rimov

Field Summary
protected  Vector schemaList
          Add schemas to this list to verify other schemas
 
Constructor Summary
DBToolTests(String name)
           
 
Method Summary
protected  boolean isAlreadyCleared()
           
protected  boolean isFailedOnce()
           
static void main(String[] args)
           
protected  void setAlreadyCleared(boolean newValue)
           
protected  void setFailedOnce(boolean newValue)
           
protected  void setUp()
          Sets up and makes sure that ConfigManager is fully loaded and ready to go.
static junit.framework.Test suite()
          Creates the test cases.
 void testAddingSchemas()
          If testing multiple schemas, this will make sure that the schema has been added to the dbtable when created.
 void testCreate()
          Runs the createTables() on the schema list to make sure no exceptions are getting thrown
 void testOtherSetups()
          Runs the othersetups() on the schema list to make sure no exceptions are getting thrown
 void testPopulateTables()
          Runs the populateTables() on the schema list to make sure no exceptions are getting thrown
 void testSerialization()
          This testcase makes sure that all DBObjects within all the schemas are serializable.
 void testSetupConfigValues()
          Runs through setting up the configuration values for a particular schema
 void testSetupSecurity()
          Runs the setupSecurity() on the schema list to make sure no exceptions are getting thrown
 void testVerify()
          Call verify on all the dbobjects.
 
Methods inherited from class com.jcorporate.expresso.services.test.ExpressoTestCase
getLog, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Field Detail

schemaList

protected Vector schemaList
Add schemas to this list to verify other schemas

Constructor Detail

DBToolTests

public DBToolTests(String name)
            throws Exception
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

isAlreadyCleared

protected boolean isAlreadyCleared()

setAlreadyCleared

protected void setAlreadyCleared(boolean newValue)

isFailedOnce

protected boolean isFailedOnce()

setFailedOnce

protected void setFailedOnce(boolean newValue)

suite

public static junit.framework.Test suite()
                                  throws Exception
Creates the test cases. Order is important, thus the manual creation.

Returns:
constructed Test suite.
Throws:
Exception - upon construction error.

testCreate

public void testCreate()
Runs the createTables() on the schema list to make sure no exceptions are getting thrown


testAddingSchemas

public void testAddingSchemas()
If testing multiple schemas, this will make sure that the schema has been added to the dbtable when created.


testPopulateTables

public void testPopulateTables()
Runs the populateTables() on the schema list to make sure no exceptions are getting thrown


testSetupSecurity

public void testSetupSecurity()
Runs the setupSecurity() on the schema list to make sure no exceptions are getting thrown


testSetupConfigValues

public void testSetupConfigValues()
Runs through setting up the configuration values for a particular schema


testOtherSetups

public void testOtherSetups()
Runs the othersetups() on the schema list to make sure no exceptions are getting thrown


testVerify

public void testVerify()
Call verify on all the dbobjects. Code is borrowed from DBTool

Also checks for unique table names. More than one DBOBject shouldn't be pointing to the same table name.


testSerialization

public void testSerialization()
This testcase makes sure that all DBObjects within all the schemas are serializable. Helps insure that there aren't any special custom "types" that might be causing troubles.


setUp

protected void setUp()
              throws Exception
Description copied from class: ExpressoTestCase
Sets up and makes sure that ConfigManager is fully loaded and ready to go.

Overrides:
setUp in class ExpressoTestCase
Throws:
Exception

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.