jmunit.framework.cldc11
Class Test

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
Direct Known Subclasses:
TestCase, TestSuite

public abstract class Test
extends AdvancedAssertion

The Test is a abstract class that has the main implementation to create a executing test class or a utility class to execute others. The MIDlet methods as startApp are localized here.

Since:
JMUnit 1.0

Field Summary
protected  Screen screen
           
 
Constructor Summary
Test(int totalOfTests, java.lang.String name)
          The default constructor.
 
Method Summary
 void destroyApp(boolean unconditional)
          It's a empty method.
 void pauseApp()
          It's a empty method.
 void setScreen(Screen screen)
          A setter method that associates a Screen's object to this instance of Test.
 void startApp()
          The startApp puts the screen in the simulator interface.
abstract  void test()
          This abstract method is used to execute the tests.
 
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
 

Field Detail

screen

protected Screen screen
Constructor Detail

Test

public Test(int totalOfTests,
            java.lang.String name)
The default constructor. It creates a screen instance with the name passed as paramenter. If the total of tests isn't lower than zero, the amount is increased in the Result class.

Parameters:
name - the name of the executing class.
totalOfTests - the amount of test methods that the subclass has.
Throws:
java.lang.IllegalArgumentException - when the total of tests is negative.
Since:
JMUnit 1.0
Method Detail

startApp

public final void startApp()
The startApp puts the screen in the simulator interface.

Specified by:
startApp in class javax.microedition.midlet.MIDlet
Since:
JMUnit 1.0

pauseApp

public final void pauseApp()
It's a empty method.

Specified by:
pauseApp in class javax.microedition.midlet.MIDlet
Since:
JMUnit 1.0

destroyApp

public final void destroyApp(boolean unconditional)
It's a empty method.

Specified by:
destroyApp in class javax.microedition.midlet.MIDlet
Parameters:
unconditional - a irrelevant boolean.
Since:
JMUnit 1.0

setScreen

public final void setScreen(Screen screen)
A setter method that associates a Screen's object to this instance of Test.

Parameters:
screen - the object that is setted.
Since:
JMUnit 1.0

test

public abstract void test()
This abstract method is used to execute the tests. Ever sub-class must create a code to let it execute it's tests.

Since:
JMUnit 1.0