|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.multijava.util.testing.TestCase
org.multijava.util.testing.FileCompareTestCase
This class is a jutils.framework.Test that compares two files. The user needs to make a derived class that overrides the (null) implementation of action, in order to do the relevant checking of the result of the compare.
| Field Summary | |
(package private) java.lang.String |
command
Holds the command String supplied in the constructor. |
(package private) java.lang.String |
file1
Holds the file name supplied in the constructor. |
(package private) java.lang.String |
file2
Holds the second file name supplied in the constructor. |
| Fields inherited from class org.multijava.util.testing.TestCase |
NEWLINE |
| Fields inherited from class junit.framework.TestCase |
|
| Constructor Summary | |
FileCompareTestCase(java.lang.String name,
java.lang.String file1,
java.lang.String file2,
java.lang.String command)
Constructs the appropriate Test. |
|
| Method Summary | |
void |
action(int result,
java.lang.String outputText,
java.lang.String errorText)
The user should override this to carry out an action (e.g. |
void |
runTest()
The runTest method required by a Test - calling this executes the test. |
| 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 |
| Field Detail |
java.lang.String command
java.lang.String file1
java.lang.String file2
| Constructor Detail |
public FileCompareTestCase(java.lang.String name,
java.lang.String file1,
java.lang.String file2,
java.lang.String command)
name - The name of the testfile1 - The first of the files to be comparedfile2 - The second of the files to be comparedcommand - The external command to be run to compare them, e.g. "diff"| Method Detail |
public void runTest()
throws java.io.IOException
runTest in class junit.framework.TestCasejava.io.IOException
public void action(int result,
java.lang.String outputText,
java.lang.String errorText)
result - The exit value produced by the external command supplied to the
constructor. For example, a 'diff' command yields 0 for a match, 1
for a non-match, and 2 for an execution error.outputText - The text produced by the output stream of the external processerrorText - The text produced by the error stream of the external process
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||