jfun.jaskell.junit
Class JUnit

java.lang.Object
  extended by jfun.jaskell.junit.AssertionSupport
      extended by jfun.jaskell.junit.JUnit

public class JUnit
extends AssertionSupport

This class adds assertion functions to a Jaskell runtime and also creates JUnit test suite from a jaskell junit script.

Author:
Ben Yu Feb 21, 2006 6:49:11 PM

Constructor Summary
JUnit(Jaskell runtime)
          To create a JUnit object.
 
Method Summary
 junit.framework.TestSuite getScriptTestSuite(java.io.File script_file)
          To create a JUnit TestSuite from a file that contains the test script.
 junit.framework.TestSuite getScriptTestSuite(java.lang.String script_name)
          To create a JUnit Test from a resource that contains the test script.
 
Methods inherited from class jfun.jaskell.junit.AssertionSupport
getRuntime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnit

public JUnit(Jaskell runtime)
To create a JUnit object.

Parameters:
runtime - the baseline runtime to add assertion support onto.
Method Detail

getScriptTestSuite

public junit.framework.TestSuite getScriptTestSuite(java.io.File script_file)
                                             throws java.io.IOException
To create a JUnit TestSuite from a file that contains the test script.

Parameters:
script_file - the script file.
Returns:
the TestSuite object.
Throws:
java.io.IOException - if file loading fails.

getScriptTestSuite

public junit.framework.TestSuite getScriptTestSuite(java.lang.String script_name)
                                             throws java.io.IOException
To create a JUnit Test from a resource that contains the test script.

Parameters:
script_name - the script file.
Returns:
the Test object.
Throws:
java.io.IOException - if resource loading fails.