001 package hw5.test;
002
003 import java.io.*;
004 import java.net.URISyntaxException;
005 import java.util.*;
006
007 import hw4.*;
008 import hw5.*;
009
010
011 /**
012 * This class implements a testing driver which reads test scripts
013 * from files for testing Graph, the Marvel parser, and your BFS
014 * algorithm.
015 **/
016 public class HW5TestDriver {
017
018
019 public static void main(String args[]) {
020 }
021
022 public HW5TestDriver(Reader r, Writer w) {
023 }
024
025 public void runTests() {
026 }
027
028 /**
029 * Get the absolute path to a file in the bin/hw5/test directory of the
030 * project. (Files placed in src/hw5/test are automatically copied to this
031 * location when the project is compiled.)
032 *
033 * For example, getAbsoluteFilename("foo.tsv") would return something like
034 * (on attu):
035 * "homes/iws/YourCSENetID/cse331/bin/hw5/test/foo.tsv"
036 *
037 * Call this method in your LoadGraph command.
038 *
039 * @param filename
040 * The simple filename for which to return the full path
041 * @return The absolute path to filename
042 */
043 private String getAbsoluteFilename(String filename) {
044 try {
045 File testDir = new File(HW5TestDriver.class.getResource("HW5TestDriver.class").toURI()).getParentFile();
046 File dataFile = new File(testDir, filename);
047 return dataFile.getAbsolutePath();
048 } catch (URISyntaxException e) {
049 return null;
050 }
051 }
052 }