de.uds.cs.st.dd.core.tester
Class JUnitFileTester

java.lang.Object
  |
  +--de.uds.cs.st.dd.core.tester.JUnitTester
        |
        +--de.uds.cs.st.dd.core.tester.JUnitFileTester
All Implemented Interfaces:
Tester

public class JUnitFileTester
extends JUnitTester

In conjunction with JUnitTester, this tester is used for automatic file testing of JUnit tests. The specified configuration will be written to a file which will be read from the JUnit test. The test outcome will then be determined. *

Author:
Philipp Bouillon

Field Summary
private  String fileName
          Stores the original filename of the test file.
 
Fields inherited from class de.uds.cs.st.dd.core.tester.JUnitTester
PRECISION_HIGH, PRECISION_LOW, PRECISION_NORMAL, testObject, time
 
Constructor Summary
JUnitFileTester()
          Creates a new JUnitFileTester object.
JUnitFileTester(String fileName)
          Creates a new JUnitFileTester object that operates on the specified * filename.
JUnitFileTester(String fileName, junit.framework.Test testObject)
          Creates a new JUnitFileTester object that operates on the specified * filename and starts the test(s) of the test object.
 
Method Summary
 String getFileName()
           
 void setFileName(String fileName)
          Sets the filename of the input file.
 int test(TConfiguration c)
          Tests a given configuration by writing the contents of it (characters) * into the test file and then calling the test method of the super class * (JUnitTester).
 
Methods inherited from class de.uds.cs.st.dd.core.tester.JUnitTester
getTestObject, setPrecision, setTestObject, setThrowable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileName

private String fileName
Stores the original filename of the test file.

Constructor Detail

JUnitFileTester

public JUnitFileTester()
Creates a new JUnitFileTester object.


JUnitFileTester

public JUnitFileTester(String fileName)
Creates a new JUnitFileTester object that operates on the specified * filename. * * @param fileName name of the file that is to be tested.


JUnitFileTester

public JUnitFileTester(String fileName,
                       junit.framework.Test testObject)
Creates a new JUnitFileTester object that operates on the specified * filename and starts the test(s) of the test object. * * @param fileName name of the file that is to be tested. * @param testObject Test object that is called to perform the testing.

Method Detail

test

public int test(TConfiguration c)
Tests a given configuration by writing the contents of it (characters) * into the test file and then calling the test method of the super class * (JUnitTester). * * @param c the configuration to test. * @return int test outcome. * @see de.uds.cs.st.dd.core.DD, de.uds.cs.st.core.tester.JUnitTester

Specified by:
test in interface Tester
Overrides:
test in class JUnitTester

getFileName

public String getFileName()
Returns:
String filename of the input file.

setFileName

public void setFileName(String fileName)
Sets the filename of the input file.

Parameters:
fileName - the filename to set.