example
Class MyTestCase

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--junit.extensions.awt.AWTTestCase
                    |
                    +--example.MyTestCase
All Implemented Interfaces:
junit.framework.Test

public class MyTestCase
extends AWTTestCase

Simple test instance of AWTTestCase. The standard test fixture is also set up to only launch the application once, but still ensure that the application under test runs if only a single test case is run. The launch method defines the application under test.


Constructor Summary
MyTestCase(java.lang.String name)
          Construct a test case with the given name.
 
Method Summary
 java.io.File getScriptDirectory()
          Indicate where to find our test scripts.
 java.lang.String getScriptPrefix()
          Indicate the prefix to use for scripts corresponding to this test case class.
 void launch()
          Launch the GUI under test.
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
          Provide a default test suite for this test case.
 boolean useSingleGUIInstance()
          Indicate whether to launch a single GUI instance for all instances of this test case.
 
Methods inherited from class junit.extensions.awt.AWTTestCase
addStepListener, disposeWindows, getFileFilter, removeStepListener, runBare, runTest, setLaunchEnabled, setManager, setTerminateEnabled, setTerminateOnFailure, shouldAccept, shouldIgnore, terminate
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MyTestCase

public MyTestCase(java.lang.String name)
Construct a test case with the given name.
Method Detail

getScriptPrefix

public java.lang.String getScriptPrefix()
Indicate the prefix to use for scripts corresponding to this test case class.
Overrides:
getScriptPrefix in class AWTTestCase

getScriptDirectory

public java.io.File getScriptDirectory()
Indicate where to find our test scripts.
Overrides:
getScriptDirectory in class AWTTestCase

useSingleGUIInstance

public boolean useSingleGUIInstance()
Indicate whether to launch a single GUI instance for all instances of this test case.
Overrides:
useSingleGUIInstance in class AWTTestCase

launch

public void launch()
Launch the GUI under test.
Overrides:
launch in class AWTTestCase

suite

public static junit.framework.Test suite()
Provide a default test suite for this test case.

main

public static void main(java.lang.String[] args)