Expresso 5-6

com.jcorporate.expresso.services.test
Class ControllerTestSuite

java.lang.Object
  extended byjunit.framework.TestSuite
      extended bycom.jcorporate.expresso.services.test.ControllerTestSuite
All Implemented Interfaces:
junit.framework.Test

public class ControllerTestSuite
extends junit.framework.TestSuite

Test suite that manages schema creation and deletion.

Version:
$Revision: 1.8 $ $Date: 2004/11/17 20:48:22 $
Author:
Michael Rimov

Constructor Summary
ControllerTestSuite()
           
 
Method Summary
 void addReadOnlySchemaDependency(Class c)
           
 void addReadOnlySchemaDependency(String s)
          Call addReadOnlySchemaDependency() if your controller depends on a schema, but does not modify the underlying data in any way.
 void addSchemaDependency(String s)
          Call this method to tell the testing system that you require such and such schema to exist for your controller test to run.
 void cleanUp()
           
 void run(junit.framework.TestResult result)
          Runs the tests and collects their result in a TestResult.
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, runTest, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ControllerTestSuite

public ControllerTestSuite()
                    throws Exception
Method Detail

addSchemaDependency

public void addSchemaDependency(String s)
                         throws Exception
Call this method to tell the testing system that you require such and such schema to exist for your controller test to run. If your controller doesn't modify any of the underlying data, use addReadOnlySchemDependency() instead. The schema will be automatically removed when the test suite is over.

Throws:
Exception

addReadOnlySchemaDependency

public void addReadOnlySchemaDependency(String s)
                                 throws Exception
Call addReadOnlySchemaDependency() if your controller depends on a schema, but does not modify the underlying data in any way. This way, the schema is not necessarily deleted when the test is finished so that there's a much better performance. (No DBCreate/Delete EACH time)

Throws:
Exception

addReadOnlySchemaDependency

public void addReadOnlySchemaDependency(Class c)
                                 throws Exception
Parameters:
c - The Schema class
Throws:
Exception - if there's an error instantiating a schema class
See Also:
addReadOnlySchemaDependency(java.lang.String)

run

public void run(junit.framework.TestResult result)
Runs the tests and collects their result in a TestResult.


cleanUp

public void cleanUp()

Expresso 5-6

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