ps6.test
Class PublicTextUITest

java.lang.Object
  extended by ps6.test.PublicTextUITest

public class PublicTextUITest
extends Object

Public (Specification) TextUI Test Suite


Field Summary
static String END_PROMPT
           
static String EOL
           
static String INPUT_PROMPTS
           
 
Constructor Summary
PublicTextUITest(String description, String[] mainParams, Class<?> mainClass, InputStream testInput, String expected)
          When instantiated, serves as an immutable TextUI test case for PS6.
 
Method Summary
static List<Object[]> getTestParameters()
          Constructs a list of parameters for each instance of PublicTextUITest.
static Object[] makeUiTest(TestRecord record)
           
 void TextUiTestCase()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_PROMPTS

public static final String INPUT_PROMPTS
See Also:
Constant Field Values

END_PROMPT

public static final String END_PROMPT
See Also:
Constant Field Values

EOL

public static String EOL
Constructor Detail

PublicTextUITest

public PublicTextUITest(String description,
                        String[] mainParams,
                        Class<?> mainClass,
                        InputStream testInput,
                        String expected)
When instantiated, serves as 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

Parameters:
mainClass - class that defines a main() that reads from System.in and writes to System.out
testInput - test input for the filter
expected - expected test output
Method Detail

TextUiTestCase

public void TextUiTestCase()

getTestParameters

public static List<Object[]> getTestParameters()
Constructs a list of parameters for each instance of PublicTextUITest. The test runner Parameterized will instantiate a PublicTextUITest for every Object[] in the returned list. Since this call to the constructor is done through reflection, we can (and must) pass around opaque arrays of objects here.


makeUiTest

public static Object[] makeUiTest(TestRecord record)