ps6.test
Class PS6TextUiTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
ps6.test.PS6TextUiTestCase
- All Implemented Interfaces:
- Test
public class PS6TextUiTestCase
- extends TestCase
An immutable TextUI test case for PS6. Runs the TextUI main method
on a given input and compared the actual output to the expected
output
Method Summary |
protected void |
runTest()
Runs the this.mainMethod, piping this.testInput into its
standard input. |
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 |
PS6TextUiTestCase
public PS6TextUiTestCase(String description,
String[] mainParams,
Class<?> iMainClass,
InputStream testInput,
String expected)
- Parameters:
mainClass
- class that defines a main() that reads from System.in and
writes to System.outtestInput
- test input for the filterexpected
- expected test output
runTest
protected void runTest()
- Runs the this.mainMethod, piping this.testInput into its
standard input. Standard output is captured and compared to this.expected
- Overrides:
runTest
in class TestCase