|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectps3.test.ScriptFileTests
public class ScriptFileTests
This class, along with a complete PS3TestDriver implementation, can be used to test the your implementations of Graph and the path finding algorithm using the script file format described in the problem set. It is assumed that the files are located in the same directory as this class. It works by parameterizing test methods over some data values, and then creating an instance for the cross-product of test methods and data values. In this case, it will create one ScriptFileTests instance per .expected file, and for each of those it will run the checkAgainstExpectedOutput() test. See the JUnit4 Javadocs for more information, or Google for more examples.
Constructor Summary | |
---|---|
ScriptFileTests(File testScriptFile)
This constructor is reflectively called by the Parameterized runner. |
Method Summary | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
static void |
calculateTestFiles()
This method searches for and creates file handles for each script test. |
||||||||||||||||||
void |
checkAgainstExpectedOutput()
The only test that is run: run a script file and test its output. |
||||||||||||||||||
static List<Object[]> |
getTestFiles()
This method is called in the constructor of Parameterized. |
||||||||||||||||||
static List<String> |
getTestLabels()
ScriptFileTestspublic ScriptFileTests(File testScriptFile)
calculateTestFilespublic static void calculateTestFiles()
getTestFilespublic static List<Object[]> getTestFiles()
getTestLabels
checkAgainstExpectedOutputpublic void checkAgainstExpectedOutput() throws IOException
|