yu.ac.bg.etf.javaqx.nunit
Class ExecTestSuite

java.lang.Object
  extended byjunit.framework.TestSuite
      extended byyu.ac.bg.etf.javaqx.nunit.ExecTestSuite
All Implemented Interfaces:
junit.framework.Test

public class ExecTestSuite
extends junit.framework.TestSuite

Test suite that executes each method who starts with "testExec" in a new separate JVM.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Constructor Summary
ExecTestSuite()
          Constructs new ExecTestSuite object.
ExecTestSuite(java.lang.Class c)
          Constructs new ExecTestSuite object.
ExecTestSuite(java.lang.Class c, java.lang.String name)
          Constructs new ExecTestSuite object.
ExecTestSuite(java.lang.String name)
          Constructs new ExecTestSuite object.
 
Method Summary
 void addTestSuite(java.lang.Class testClass)
          
protected  java.io.File createErrorStreamFile()
          Creates a temporary file for the error stream.
protected  java.io.File createFailureStreamFile()
          Returns a temporary file for the failure stream.
protected  void execTest(junit.framework.TestCase test, junit.framework.TestResult result)
          Executes specified test in a separate JVM.
static void main(java.lang.String[] args)
          Test suite main method.
 void runTest(junit.framework.Test test, junit.framework.TestResult result)
          
 void stopTest()
          Stops test running.
 
Methods inherited from class junit.framework.TestSuite
addTest, countTestCases, createTest, getName, getTestConstructor, run, setName, testAt, testCount, tests, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExecTestSuite

public ExecTestSuite()
Constructs new ExecTestSuite object.


ExecTestSuite

public ExecTestSuite(java.lang.String name)
Constructs new ExecTestSuite object.

Parameters:
name - the test suite name

ExecTestSuite

public ExecTestSuite(java.lang.Class c)
Constructs new ExecTestSuite object.

Parameters:
c - the test suite class

ExecTestSuite

public ExecTestSuite(java.lang.Class c,
                     java.lang.String name)
Constructs new ExecTestSuite object.

Parameters:
c - the test suite class
name - the test suite name
Method Detail

stopTest

public void stopTest()
Stops test running.


createErrorStreamFile

protected java.io.File createErrorStreamFile()
Creates a temporary file for the error stream.

Returns:
a temporary file for the error stream

createFailureStreamFile

protected java.io.File createFailureStreamFile()
Returns a temporary file for the failure stream.

Returns:
a temporary file for the failure stream

execTest

protected void execTest(junit.framework.TestCase test,
                        junit.framework.TestResult result)
Executes specified test in a separate JVM.

Parameters:
test - the test
result - the test result

addTestSuite

public void addTestSuite(java.lang.Class testClass)


runTest

public void runTest(junit.framework.Test test,
                    junit.framework.TestResult result)


main

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

NOTE: Do not call this method!

Parameters:
args - main method arguments


Copyright © 2007 ETF and contributors. All Rights Reserved.