Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

junit.awtui.* (4)junit.extensions.* (14)junit.framework.* (16)
junit.hartmath.* (2)junit.log4j.* (8)junit.logswingui.* (12)
junit.runner.* (13)junit.samples.* (7)junit.swingui.* (13)
junit.tests.* (35)junit.textui.* (2)

Package Samples:

junit.extensions.abbot
junit.log4j
junit.logswingui
junit.hartmath
junit.framework
junit.samples.money
junit.samples
junit.tests.extensions
junit.tests.framework
junit.tests.runner
junit.tests
junit.awtui
junit.extensions
junit.runner
junit.swingui
junit.textui

Classes:

TestCase: A test case defines the fixture to run multiple tests. To define a test case 1) implement a subclass of TestCase 2) define instance variables that store the state of the fixture 3) initialize the fixture state by overriding setUp 4) clean-up after a test by overriding tearDown . Each test runs in its own fixture so there can be no side effects among test runs. Here is an example: public class MathTest extends TestCase { protected double fValue1; protected double fValue2; protected void setUp() { fValue1= 2.0; fValue2= 3.0; } } For each test implement a method which interacts with the fixture. Verify ...
ScriptTestSuite: Similar to TestSuite, except that it auto-generates a suite based on test scripts matching certain criteria. By default, generate a suite of all scripts found in a given directory for which the accept method returns true. Note that there is no guarantee of the order of the scripts. The ScriptTestSuite constructors which require a class argument provide a means for using custom fixtures derived from ScriptFixture . The default fixture preserves existing environment windows (e.g. the JUnit Swing UI TestRunner) and disposes of all windows generated by the code under test. Derived fixtures may provide ...
TestRunner: A Swing based user interface to run tests and protocol their results with Log4J . This test runner is derived by the widely used clipboard inheritence pattern from the original Swing based JUnit test runner. Unfortunately, it is almost impossible to subclass this runner. Enter the name of a class which either provides a static suite method or is a subclass of TestCase. Synopsis: java junit.logswingui.TestRunner [-noloading] [TestCase] TestRunner takes as an optional argument the name of the testcase class to be run.
TestSuite: A TestSuite is a Composite of Tests. It runs a collection of test cases. Here is an example using the dynamic test definition. TestSuite suite= new TestSuite(); suite.addTest(new MathTest("testAdd")); suite.addTest(new MathTest("testDivideByZero")); Alternatively, a TestSuite can extract the tests to be run automatically. To do so you pass the class of your TestCase class to the TestSuite constructor. TestSuite suite= new TestSuite(MathTest.class); This constructor creates a suite with all the methods starting with "test" that take no arguments.
TestCaseClassLoader: A custom class loader which enables the reloading of classes for each test run. The class loader can be configured with a list of package paths that should be excluded from loading. The loading of these packages is delegated to the system class loader. They will be shared across test runs. The list of excluded package paths is specified in a properties file "excluded.properties" that is located in the same place as the TestCaseClassLoader class. Known limitation: the TestCaseClassLoader cannot load classes from jar files.
TestRunner: A command line based tool to run tests. java junit.textui.TestRunner [-wait] TestCaseClass TestRunner expects the name of a TestCase class as argument. If this class defines a static suite method it will be invoked and the returned test is run. Otherwise all the methods starting with "test" having no arguments are run. When the wait command line argument is given TestRunner waits until the users types RETURN. TestRunner prints a trace as the tests are executed followed by a summary at the end.
JUnitLayout: Extension of org.apache.log4j.PatternLayout to provide stack traces of throwables in the appenders. The additionally recognized conversion characters are: Conversion Character Effect T Print the stack trace of the throwable. Created: Sat Nov 17 15:09:19 2001
MoneyBag: A MoneyBag defers exchange rate conversions. For example adding 12 Swiss Francs to 14 US Dollars is represented as a bag containing the two Monies 12 CHF and 14 USD. Adding another 10 Swiss francs gives a bag with 22 CHF and 14 USD. Due to the deferred exchange rate conversion we can later value a MoneyBag with different exchange rates. A MoneyBag is represented as a list of Monies and provides different constructors to create a MoneyBag.
ExceptionTestCase: A TestCase that expects an Exception of class fExpected to be thrown. The other way to check that an expected exception is thrown is: try { shouldThrow(); } catch (SpecialException e) { return; } fail("Expected SpecialException"); To use ExceptionTestCase, create a TestCase like: new ExceptionTestCase("testShouldThrow", SpecialException.class);
TestResult: A TestResult collects the results of executing a test case. It is an instance of the Collecting Parameter pattern. The test framework distinguishes between failures and errors . A failure is anticipated and checked for with assertions. Errors are unanticipated problems like an ArrayIndexOutOfBoundsException .
TestRunner: A Swing based user interface to run tests. Enter the name of a class which either provides a static suite method or is a subclass of TestCase. Synopsis: java junit.swingui.TestRunner [-noloading] [TestCase] TestRunner takes as an optional argument the name of the testcase class to be run.
TestRunner: An AWT based user interface to run tests. Enter the name of a class which either provides a static suite method or is a subclass of TestCase. Synopsis: java junit.awtui.TestRunner [-noloading] [TestCase] TestRunner takes as an optional argument the name of the testcase class to be run.
JUnitAppenderSingleton: Singleton that distributes logging events 55 to all registered logging listeners . Created: Mon Nov 12 10:21:18 2001
JUnitAppender: Appender that joins JUnit and Log4J . Created: Mon Nov 12 07:49:22 2001
JUnitPatternParser: Extension of org.apache.log4j.helpers.PatternParser writing the stack trace of the throwable to the result string. Created: Sat Nov 17 15:19:09 2001
ClassPathTestCollector: An implementation of a TestCollector that consults the class path. It considers all classes on the class path excluding classes in JARs. It leaves it up to subclasses to decide whether a class is a runnable Test.
LoggedJspTestCase: Extension of Cactus JspTestCase integrating Log4J Created: Sun Nov 18 00:03:14 2001
TestRunView: A TestRunView is shown as a page in a tabbed folder. It contributes the page contents and can return the currently selected tests. A TestRunView is notified about the start and finish of a run.
TestRunView: A TestRunView is shown as a page in a tabbed folder. It contributes the page contents and can return the currently selected tests. A TestRunView is notified about the start and finish of a run.
Sorter: A custom quick sort with support to customize the swap behaviour. NOTICE: We can't use the the sorting support from the JDK 1.2 collection classes because of the JDK 1.1.7 compatibility.
TestDecorator: A Decorator for Tests. Use TestDecorator as the base class for defining new test decorators. Test decorator subclasses can be introduced to add behaviour before or after a test is run.
TestSetup: A Decorator to set up and tear down additional fixture state. Subclass TestSetup and insert it into your tests when you want to set up additional state once before the tests are run.
AppenderListener: Listens to a Appender of Log4J . Created: Mon Nov 12 10:34:13 2001
TestRunListener: A listener interface for observing the execution of a test run. Unlike TestListener, this interface using only primitive objects, making it suitable for remote test execution.
ActiveTestSuite: A TestSuite for active Tests. It runs each test in a separate thread and waits until all threads have terminated. -- Aarhus Radisson Scandinavian Center 11th floor

Home | Contact Us | Privacy Policy | Terms of Service