net.sf.jameleon.unit
Class JameleonUnitTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sf.jameleon.unit.JameleonUnitTestCase
All Implemented Interfaces:
EventListener, junit.framework.Test, TestCaseListener

public abstract class JameleonUnitTestCase
extends junit.framework.TestCase
implements TestCaseListener

A class to help with unit testing scripts and tags.


Constructor Summary
JameleonUnitTestCase(String name)
           
 
Method Summary
 void beginTestCase(TestCaseEvent event)
          Implementation of the TestCaseListener interface.
 void endTestCase(TestCaseEvent event)
          Implementation of the TestCaseListener interface.
 TestCaseResult getTestCaseResult()
          Gets the test case result of the script that was run from the runScript method
 TestCaseTag getTestCaseTag()
          Gets the test case tag of the script that was run from the runScript method
 TestCaseResult runScript(File script)
           
 TestCaseResult runScript(String script)
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JameleonUnitTestCase

public JameleonUnitTestCase(String name)
Method Detail

beginTestCase

public void beginTestCase(TestCaseEvent event)
Implementation of the TestCaseListener interface. Currently does nothing.

Specified by:
beginTestCase in interface TestCaseListener
Parameters:
event - The TestCaseEvent that spawned this event. The source of the event is the TestCaseTag

endTestCase

public void endTestCase(TestCaseEvent event)
Implementation of the TestCaseListener interface. Gets the handle on the test case tag and the results.

Specified by:
endTestCase in interface TestCaseListener
Parameters:
event - The TestCaseEvent that spawned this event. The source of the event is the TestCaseTag

runScript

public TestCaseResult runScript(String script)

runScript

public TestCaseResult runScript(File script)

getTestCaseResult

public TestCaseResult getTestCaseResult()
Gets the test case result of the script that was run from the runScript method

Returns:
the test case result of the script that was run from the runScript method

getTestCaseTag

public TestCaseTag getTestCaseTag()
Gets the test case tag of the script that was run from the runScript method

Returns:
the test case tag of the script that was run from the runScript method


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.