edu.washington.cs.supple.test
Class ExampleApplicationTest

java.lang.Object
  extended byTestCase
      extended byedu.washington.cs.supple.test.ExampleApplicationTest
All Implemented Interfaces:
java.util.EventListener, SolverListener

public class ExampleApplicationTest
extends TestCase
implements SolverListener

ApplicationTest checks for solutions to application UI. It is parameterized by application, device, and screen size. The JUnit test suite checks our example apps against a matrix of devices and screen sizes.

Author:
dbc1
See Also:
Serialized Form

Field Summary
static boolean bImpatient
          If bImpatient is true, tests fail if first solution isn't reached in a minimum amount of time.
 
Constructor Summary
ExampleApplicationTest(java.lang.Class applicationClass, java.lang.Class deviceClass, java.awt.Dimension screenSize)
          Create an individual test case
ExampleApplicationTest(SuppleApplication application, java.lang.Class deviceClass, java.awt.Dimension screenSize)
          Create an individual test case
 
Method Summary
static void main(java.lang.String[] args)
          Run the test suite manually...
 void runTest()
          Run all the tests...ovverides reflection (we want the name to include fixture info)
protected  void setUp()
           
 void solutionAvailable(Solution solution)
          This method is called when the search comes up with an improvement to the interface -- allows the listener to use the partial results
static Test suite()
          Build the complete test matrix
protected  void tearDown()
           
 void testSolveMain()
          Open up the app UI and see if a solution can be found
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bImpatient

public static boolean bImpatient
If bImpatient is true, tests fail if first solution isn't reached in a minimum amount of time.

Constructor Detail

ExampleApplicationTest

public ExampleApplicationTest(java.lang.Class applicationClass,
                              java.lang.Class deviceClass,
                              java.awt.Dimension screenSize)
Create an individual test case

Parameters:
applicationClass -
deviceClass -
screenSize -

ExampleApplicationTest

public ExampleApplicationTest(SuppleApplication application,
                              java.lang.Class deviceClass,
                              java.awt.Dimension screenSize)
Create an individual test case

Parameters:
deviceClass -
screenSize -
Method Detail

runTest

public void runTest()
Run all the tests...ovverides reflection (we want the name to include fixture info)


suite

public static Test suite()
Build the complete test matrix

Returns:

main

public static void main(java.lang.String[] args)
Run the test suite manually...

Parameters:
args -

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

testSolveMain

public void testSolveMain()
Open up the app UI and see if a solution can be found


solutionAvailable

public void solutionAvailable(Solution solution)
Description copied from interface: SolverListener
This method is called when the search comes up with an improvement to the interface -- allows the listener to use the partial results

Specified by:
solutionAvailable in interface SolverListener

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception