mjc

org.multijava.util.testing
Class TestFilesCompileAndRunTestSuite.Helper

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.multijava.util.testing.TestCase
              extended byorg.multijava.util.testing.TestFilesTestSuite.Helper
                  extended byorg.multijava.util.testing.TestFilesCompileOnlyTestSuite.Helper
                      extended byorg.multijava.util.testing.TestFilesCompileAndRunTestSuite.Helper
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
TestFilesCompileAndRunTestSuite

public class TestFilesCompileAndRunTestSuite.Helper
extends TestFilesCompileOnlyTestSuite.Helper

This is a helper class that is actually a TestCase; it is run repeatedly with different constructor arguments.


Field Summary
 
Fields inherited from class org.multijava.util.testing.TestFilesTestSuite.Helper
args, fileToTest
 
Fields inherited from class org.multijava.util.testing.TestCase
NEWLINE
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestFilesCompileAndRunTestSuite.Helper(String filename, String[] args)
          The constructor called by the JUnit framework.
 
Method Summary
protected  void dotest(ByteArrayOutputStream ba)
          Executes this test case.
 
Methods inherited from class org.multijava.util.testing.TestFilesTestSuite.Helper
expectedStatusReport, runTest
 
Methods inherited from class org.multijava.util.testing.TestCase
assertDiff, assertEquals
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestFilesCompileAndRunTestSuite.Helper

public TestFilesCompileAndRunTestSuite.Helper(String filename,
                                              String[] args)
The constructor called by the JUnit framework. The argument is used as the name of the test as well as the name of the file to be tested.

Method Detail

dotest

protected void dotest(ByteArrayOutputStream ba)
               throws IllegalAccessException,
                      IllegalArgumentException,
                      IOException,
                      InvocationTargetException
Executes this test case. This method compiles the given file and runs the main method. If the compilation or the exectution of the main method produces any output, then test fails; otherwise, test succeeds.

Overrides:
dotest in class TestFilesCompileOnlyTestSuite.Helper
Throws:
IllegalAccessException
IllegalArgumentException
IOException
InvocationTargetException

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.