JML

org.jmlspecs.jmlunit.strategies
Class LimitedTestSuite

java.lang.Object
  extended byjunit.framework.TestSuite
      extended byorg.jmlspecs.jmlunit.strategies.LimitedTestSuite
All Implemented Interfaces:
junit.framework.Test

public class LimitedTestSuite
extends junit.framework.TestSuite

A kind of test suite that only allows the first n tests to be added, and ignores the rest.

Author:
Gary T. Leavens
See Also:
TestSuite

Field Summary
protected  int limit
           
 
Fields inherited from class junit.framework.TestSuite
 
Constructor Summary
LimitedTestSuite(int n)
          Initialize this LimitedTestSuite to have the given limit.
LimitedTestSuite(String name, int n)
          Initialize this LimitedTestSuite to have the given limit.
 
Method Summary
 void addTest(junit.framework.Test test)
          Add a test to this test suite, or throw a TestSuiteFullException if this test suite is already full.
 
Methods inherited from class junit.framework.TestSuite
addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

limit

protected int limit
Constructor Detail

LimitedTestSuite

public LimitedTestSuite(int n)
Initialize this LimitedTestSuite to have the given limit.


LimitedTestSuite

public LimitedTestSuite(String name,
                        int n)
Initialize this LimitedTestSuite to have the given limit.

Method Detail

addTest

public void addTest(junit.framework.Test test)
Add a test to this test suite, or throw a TestSuiteFullException if this test suite is already full.

Overrides:
addTest in class junit.framework.TestSuite

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.