superwaba.ext.xplat.unit
Class TestSuite

java.lang.Object
  |
  +--waba.ui.Control
        |
        +--waba.ui.Container
              |
              +--waba.ui.Window
                    |
                    +--waba.ui.MainWindow
                          |
                          +--superwaba.ext.xplat.unit.TestSuite

public abstract class TestSuite
extends MainWindow

JUnit implementation for SuperWaba, to be used in the device (or in the desktop). It simulates the same output that you get when using JUnit under Eclipse. To use it, you must extend this class and add the test cases using the addTestCase method. See an example in the samples/sys/testcases folder.


Field Summary
protected  MenuBar mbar
           
 
Fields inherited from class waba.ui.MainWindow
defaultFont
 
Fields inherited from class waba.ui.Window
_controlEvent, _focus, _keyEvent, _penEvent, beepIfOut, blockingCount, borderStyle, canDrag, eraseBackgroundNow, flicker, HIDE_STATE, highlighted, highResPrepared, imgCovered, lastSwappedContainer, mainSwapContainer, menubar, needsPaint, NO_BORDER, RECT_BORDER, ROUND_BORDER, TAB_BORDER, TAB_ONLY_BORDER, title, titleFont, topMost, VK_BOTTOM, VK_HIDE, VK_SHOW, VK_TOP, zStack
 
Fields inherited from class waba.ui.Container
BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_SIMPLE, children, lastH, lastW, lastX, lastY, parentWindow, started, tabOrder, tail
 
Fields inherited from class waba.ui.Control
AFTER, appId, appObj, asContainer, asWindow, backColor, backDis, BEFORE, BOTTOM, CENTER, clearValueInt, clearValueStr, enabled, FILL, FIT, fm, fmH, focusLess, focusTraversable, font, foreColor, foreDis, height, highlightRectsCount, isHighlighting, LEFT, parent, PREFERRED, RANGE, RIGHT, SAME, TOP, uiCE, uiFlat, uiPalm, uiVista, visible, width, x, x2, y, y2
 
Constructor Summary
TestSuite(java.lang.String title)
           
 
Method Summary
 void addTestCase(java.lang.Class c)
          Add a new testcase.
 void onEvent(Event e)
          If you override this method, you must call super.onEvent(); this call must be the first statement
 void onStart()
          If you override this method, you must call super.onStart(); this call must be the first statement
 
Methods inherited from class waba.ui.MainWindow
_onTimerTick, _runThreads, addThread, addTimer, appEnding, appStarting, exit, getCommandLine, getFontMetrics, getMainWindow, killThreads, onExit, removeThread, removeTimer, setRect
 
Methods inherited from class waba.ui.Window
_doPaint, _doPaint, _postEvent, _postSoundEvent, damageRect, destroyZStack, dontSaveBehind, drawHighlight, getClientRect, getClientRect, getFocus, getHighlighted, getOffScreen, getPreferredHeight, getPreferredWidth, getTopMost, handleFocusChangeKeys, isTopMost, isVisible, loadBehind, makeUnmovable, onClickedOutside, onPopup, onUnpop, paintTitle, popupBlockingModal, popupMenuBar, popupModal, postPopup, postPressedEvent, postUnpop, pumpEvents, saveBehind, setBorderStyle, setDoubleBuffer, setFocus, setHighlighted, setMenuBar, setStatePosition, setTitle, setTitleFont, swap, swapFocus, unpop, updateScreen, validate
 
Methods inherited from class waba.ui.Container
add, add, add, broadcastEvent, clear, findChild, getChildren, onAdd, onColorsChanged, onPaint, onRemove, paintChildren, remove, setEnabled, setHighlighting, swapToTopmostWindow
 
Methods inherited from class waba.ui.Control
addTimer, changeHighlighted, contains, createGraphics, getAbsoluteRect, getBackColor, getFont, getForeColor, getNext, getParent, getParentWindow, getPos, getRect, getSize, isDisplayed, isEnabled, onBoundsChanged, onFontChanged, onWindowPaintFinished, postEvent, repaint, repaintNow, requestFocus, setBackColor, setBackForeColors, setFocusLess, setFont, setForeColor, setRect, setRect, setVisible, translateFromOrigin, uiStyleChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mbar

protected MenuBar mbar
Constructor Detail

TestSuite

public TestSuite(java.lang.String title)
Method Detail

addTestCase

public void addTestCase(java.lang.Class c)
Add a new testcase.

onStart

public void onStart()
If you override this method, you must call super.onStart(); this call must be the first statement
Overrides:
onStart in class MainWindow

onEvent

public void onEvent(Event e)
If you override this method, you must call super.onEvent(); this call must be the first statement
Overrides:
onEvent in class Control
Tags copied from class: Control
Parameters:
event - the event to process
See Also:
Event, KeyEvent, PenEvent