|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hw7.test.ScriptFileTests
public class ScriptFileTests
This class, along with HW7TestDriver, can be used to test your Campus Paths application. It is assumed that the files are located in the same directory. 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 HW7TestDriver 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
|