jmunit.framework.cldc11
Class TestSuite

java.lang.Object
  extended by javax.microedition.midlet.MIDlet
      extended by jmunit.framework.cldc11.Assertion
          extended by jmunit.framework.cldc11.AdvancedAssertion
              extended by jmunit.framework.cldc11.Test
                  extended by jmunit.framework.cldc11.TestSuite

public class TestSuite
extends Test

The TestSuite class is responsible for execute many TestCases. As it extends Test, it can be used as a MIDlet in a simulator. To use it, it's necessary to create a subclass with a super() declaration in the constructor. The method add(TestCase testCase) must be used in the constructor of the subclass, adding the TestCases objects that are necessary to be runned. When everthing is coded, the TestSuite can be used in the simulator.

Since:
JMUnit 1.0

Field Summary
 
Fields inherited from class jmunit.framework.cldc11.Test
screen
 
Constructor Summary
TestSuite()
          The default constructor.
TestSuite(java.lang.String name)
          It must be called by the subclass constructor with a name parameter.
 
Method Summary
 void add(TestCase testCase)
          The purpose of this method is store TestCases.
 void test()
          The test method executes all the TestCases stored by the add method.
 
Methods inherited from class jmunit.framework.cldc11.Test
destroyApp, pauseApp, setScreen, startApp
 
Methods inherited from class jmunit.framework.cldc11.Assertion
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail, fail
 
Methods inherited from class javax.microedition.midlet.MIDlet
checkPermission, getAppProperty, notifyDestroyed, notifyPaused, platformRequest, resumeRequest
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSuite

public TestSuite()
The default constructor. As such TestSuite can be added to MIDlet list as is and it will take list of classes to test from JMUnitTestClasses property.

Parameters:
name - the name of the TestSuite.
Since:
JMUnit 1.0

TestSuite

public TestSuite(java.lang.String name)
It must be called by the subclass constructor with a name parameter. It's also responsability of the subclass to add TestCase objects to be executed in it's constructor.

Parameters:
name - the name of the TestSuite.
Since:
JMUnit 1.0
Method Detail

add

public final void add(TestCase testCase)
The purpose of this method is store TestCases. It uses a simple linkedlist to store them during runtime.

Parameters:
testCase - the TestCase to be added.
Since:
JMUnit 1.0

test

public final void test()
The test method executes all the TestCases stored by the add method.

Specified by:
test in class Test
Since:
JMUnit 1.0