| java.lang.Object com.sun.portal.samples.asc.tests.Compare
Compare | public class Compare (Code) | | Compares test results with expected and unexpected reference output. Each
line of the reference file(s) is compared against the test results. A test
failure is generated if:
- any line in the expected reference file is not found as a substring of
any line in the test results, or
- any line in the unexpected reference file is found as a substring of any
line in the test results
|
Constructor Summary | |
public | Compare(TestCase test) Creates a Compare class with error messages going to
stdout. | public | Compare(TestCase test, PrintStream out) Creates a Compare class. |
Method Summary | |
public void | check(String result, String expected, String unexpected) Checks the given test results against expected and unexpected output. | public void | expected(String result, String filename) Checks the given test results against expected output. | public void | unexpected(String result, String filename) Checks the given test results against unexpected output. |
test | public TestCase test(Code) | | |
Compare | public Compare(TestCase test)(Code) | | Creates a Compare class with error messages going to
stdout.
Parameters: test - the test case calling this class |
Compare | public Compare(TestCase test, PrintStream out)(Code) | | Creates a Compare class.
Parameters: test - the test case calling this class Parameters: out - where error messages will be sent |
check | public void check(String result, String expected, String unexpected)(Code) | | Checks the given test results against expected and unexpected output.
Parameters: result - the test results Parameters: expected - the filename for expected output Parameters: unexpected - the filename for unexpected output |
expected | public void expected(String result, String filename)(Code) | | Checks the given test results against expected output.
Parameters: result - the test results Parameters: filename - the filename for expected output |
unexpected | public void unexpected(String result, String filename)(Code) | | Checks the given test results against unexpected output.
Parameters: result - the test results Parameters: filename - the filename for unexpected output |
|
|