Java Reference
In-Depth Information
Example 13.3 A suite of test cases
package net.multitool.core;
import junit.framework.*;
public class
CoreTest
extends TestCase
{
public
CoreTest(String str)
{
super(str);
} // constructor CoreTest
/**
* Constructs a collection of tests to be run by the TestRunner.
*/
public static Test
suite()
{
/*
* Add the results of each separate Test into a big Suite.
*/
TestSuite suite = new TestSuite("Core Classes");
suite.addTestSuite(net.multitool.util.SAMoneyTest.class);
suite.addTestSuite(AccountTest.class);
suite.addTestSuite(UserTest.class);
return suite;
} // suite
public static void
main(String [] args)
{
junit.textui.TestRunner.run(suite());
} // main
} // class CoreTest
Search WWH ::




Custom Search