// Path: src/test/Input.java
// public class Input {
// 	private static HashMap<String, String[]> filesMap = new HashMap<>();
// 	private static HashMap<String[], String> reverseFileMap = new HashMap<>();
// 
// 	/**
// 	 * This class is not meant to be instantiated.
// 	 */
// 	private Input() {
// 	}
// 
// 	/**
// 	 * Returns a path to a file containing the lines given in {@code lines}. Creates the file if it was not created
// 	 * before.
// 	 * 
// 	 * @param lines
// 	 *            The lines to print in the file.
// 	 * @return path to a file containing {@code lines}
// 	 */
// 	public static String getFile(String... lines) {
// 		String fileName;
// 		if (!Input.reverseFileMap.containsKey(lines)) {
// 			fileName = UUID.randomUUID().toString() + ".txt";
// 			File file = new File(fileName);
// 			BufferedWriter outputWriter = null;
// 			try {
// 				outputWriter = new BufferedWriter(new FileWriter(file));
// 				for (String line : lines) {
// 					outputWriter.write(line);
// 					outputWriter.newLine();
// 				}
// 				outputWriter.flush();
// 				outputWriter.close();
// 				file.deleteOnExit();
// 			} catch (IOException e) {
// 				fail("The test was unable to create a test file. That's a shame!");
// 			}
// 
// 			Input.filesMap.put(fileName, lines);
// 			Input.reverseFileMap.put(lines, fileName);
// 		} else {
// 			fileName = Input.reverseFileMap.get(lines);
// 		}
// 		return fileName;
// 	}
// 
// 	/**
// 	 * Returns a path to a file containing the lines given in {@code lines}. Creates the file if it was not created
// 	 * before.
// 	 * 
// 	 * @param lines
// 	 *            The lines to print in the file.
// 	 * @return path to a file containing {@code lines}
// 	 */
// 	public static String getFile(Collection<String> lines) {
// 		String[] linesArray = new String[lines.size()];
// 		Iterator<String> iterator = lines.iterator();
// 		for (int i = 0; iterator.hasNext(); i++) {
// 			linesArray[i] = iterator.next();
// 		}
// 		return getFile(linesArray);
// 	}
// 
// 	/**
// 	 * A message giving information about the input file used in a test.
// 	 * 
// 	 * @param filePath
// 	 *            The command line arguments the main method was called with during the test. The file message will read
// 	 *            the file name in the second argument and output the contents of the file its pointing to.
// 	 * @return A text representing the input file
// 	 */
// 	public static String fileMessage(String filePath) {
// 		String result = "";
// 		if (filesMap.containsKey(filePath)) {
// 			result = "\n with the following input file:\n\n" + arrayToLines(filesMap.get(filePath)) + "\n\n";
// 		}
// 		return result;
// 	}
// 
// 	/**
// 	 * @return The paths to all generated input files.
// 	 */
// 	public static List<String> getAllFilePaths() {
// 		return new LinkedList<String>(filesMap.keySet());
// 	}
// 
// 	/**
// 	 * @param filePath
// 	 *            The path of a generated input file.
// 	 * @return The lines of the input file that was given the path {@code filePath}, {@code null} if there is no such
// 	 *         file.
// 	 */
// 	public static String[] getFileContentOf(String filePath) {
// 		return filesMap.get(filePath);
// 	}
// 
// 	public static boolean isFile(String fileName) {
// 		return filesMap.containsKey(fileName);
// 	}
// 
// 	/**
// 	 * Converts an Array of Strings into a String where each array element is represented as one line.
// 	 * 
// 	 * @param lines
// 	 *            The array to process
// 	 * @return the array as lines.
// 	 */
// 	public static String arrayToLines(String[] lines) {
// 		String result = "";
// 		for (String line : lines) {
// 			if (result != "") {
// 				result += "\n";
// 			}
// 			result += line;
// 		}
// 		return result;
// 	}
// 
// }
// 
// Path: src/test/runs/Run.java
// public interface Run {
// 
// 	/**
// 	 * Checks whether the output of the tested class does fulfil the needs defined by this run. Throws an exception if
// 	 * it doesn't.
// 	 * 
// 	 * @param testedClassOutput
// 	 *            The output of the tested class for this run. One String represents one call to
// 	 *            {@code Terminal.printLine}.
// 	 * @param errorMessage
// 	 *            The message that will be reported to {@link org.junit.Assert#fail(String)} or
// 	 *            {@link org.junit.Assert#assertThat(String, Object, org.hamcrest.Matcher)}
// 	 * @throws RunFailedException
// 	 *             If {@code testedClassOutput} does not fulfil this test run's expected output.
// 	 */
// 	public void check(String[] testedClassOutput, String errorMessage);
// 
// 	/**
// 	 * @return The command that is to be run on the interactive console for this test run.
// 	 */
// 	public String getCommand();
// 
// 	/**
// 	 * @return A String describing what this test run expects the tested class to print.
// 	 */
// 	public String getExpectedDescription();
// }


import org.junit.Test;
import test.Input;
import test.runs.Run;
package final2.subtests;



/**
 * Checks the {@code print} command without running any other commands. Asserts that {@code print} works, which is
 * crucial for other tests to work.
 * 
 * @author Joshua Gleitze
 */
public class PrintTest extends LangtonSubtest {

	@Test
	public void correctInputFilePrintTest() {
		String[][] inputFiles = {
				PUBLIC_PRAKTOMAT_TEST_FILE_1,
				PUBLIC_PRAKTOMAT_TEST_FILE_2,
				PUBLIC_PRAKTOMAT_TEST_FILE_3,
				PUBLIC_PRAKTOMAT_TEST_FILE_4,
				TASK_SHEET_INPUT_FILE_1,
				TASK_SHEET_INPUT_FILE_2
		};

// Path: src/test/Input.java
// public class Input {
// 	private static HashMap<String, String[]> filesMap = new HashMap<>();
// 	private static HashMap<String[], String> reverseFileMap = new HashMap<>();
// 
// 	/**
// 	 * This class is not meant to be instantiated.
// 	 */
// 	private Input() {
// 	}
// 
// 	/**
// 	 * Returns a path to a file containing the lines given in {@code lines}. Creates the file if it was not created
// 	 * before.
// 	 * 
// 	 * @param lines
// 	 *            The lines to print in the file.
// 	 * @return path to a file containing {@code lines}
// 	 */
// 	public static String getFile(String... lines) {
// 		String fileName;
// 		if (!Input.reverseFileMap.containsKey(lines)) {
// 			fileName = UUID.randomUUID().toString() + ".txt";
// 			File file = new File(fileName);
// 			BufferedWriter outputWriter = null;
// 			try {
// 				outputWriter = new BufferedWriter(new FileWriter(file));
// 				for (String line : lines) {
// 					outputWriter.write(line);
// 					outputWriter.newLine();
// 				}
// 				outputWriter.flush();
// 				outputWriter.close();
// 				file.deleteOnExit();
// 			} catch (IOException e) {
// 				fail("The test was unable to create a test file. That's a shame!");
// 			}
// 
// 			Input.filesMap.put(fileName, lines);
// 			Input.reverseFileMap.put(lines, fileName);
// 		} else {
// 			fileName = Input.reverseFileMap.get(lines);
// 		}
// 		return fileName;
// 	}
// 
// 	/**
// 	 * Returns a path to a file containing the lines given in {@code lines}. Creates the file if it was not created
// 	 * before.
// 	 * 
// 	 * @param lines
// 	 *            The lines to print in the file.
// 	 * @return path to a file containing {@code lines}
// 	 */
// 	public static String getFile(Collection<String> lines) {
// 		String[] linesArray = new String[lines.size()];
// 		Iterator<String> iterator = lines.iterator();
// 		for (int i = 0; iterator.hasNext(); i++) {
// 			linesArray[i] = iterator.next();
// 		}
// 		return getFile(linesArray);
// 	}
// 
// 	/**
// 	 * A message giving information about the input file used in a test.
// 	 * 
// 	 * @param filePath
// 	 *            The command line arguments the main method was called with during the test. The file message will read
// 	 *            the file name in the second argument and output the contents of the file its pointing to.
// 	 * @return A text representing the input file
// 	 */
// 	public static String fileMessage(String filePath) {
// 		String result = "";
// 		if (filesMap.containsKey(filePath)) {
// 			result = "\n with the following input file:\n\n" + arrayToLines(filesMap.get(filePath)) + "\n\n";
// 		}
// 		return result;
// 	}
// 
// 	/**
// 	 * @return The paths to all generated input files.
// 	 */
// 	public static List<String> getAllFilePaths() {
// 		return new LinkedList<String>(filesMap.keySet());
// 	}
// 
// 	/**
// 	 * @param filePath
// 	 *            The path of a generated input file.
// 	 * @return The lines of the input file that was given the path {@code filePath}, {@code null} if there is no such
// 	 *         file.
// 	 */
// 	public static String[] getFileContentOf(String filePath) {
// 		return filesMap.get(filePath);
// 	}
// 
// 	public static boolean isFile(String fileName) {
// 		return filesMap.containsKey(fileName);
// 	}
// 
// 	/**
// 	 * Converts an Array of Strings into a String where each array element is represented as one line.
// 	 * 
// 	 * @param lines
// 	 *            The array to process
// 	 * @return the array as lines.
// 	 */
// 	public static String arrayToLines(String[] lines) {
// 		String result = "";
// 		for (String line : lines) {
// 			if (result != "") {
// 				result += "\n";
// 			}
// 			result += line;
// 		}
// 		return result;
// 	}
// 
// }
// 
// Path: src/test/runs/Run.java
// public interface Run {
// 
// 	/**
// 	 * Checks whether the output of the tested class does fulfil the needs defined by this run. Throws an exception if
// 	 * it doesn't.
// 	 * 
// 	 * @param testedClassOutput
// 	 *            The output of the tested class for this run. One String represents one call to
// 	 *            {@code Terminal.printLine}.
// 	 * @param errorMessage
// 	 *            The message that will be reported to {@link org.junit.Assert#fail(String)} or
// 	 *            {@link org.junit.Assert#assertThat(String, Object, org.hamcrest.Matcher)}
// 	 * @throws RunFailedException
// 	 *             If {@code testedClassOutput} does not fulfil this test run's expected output.
// 	 */
// 	public void check(String[] testedClassOutput, String errorMessage);
// 
// 	/**
// 	 * @return The command that is to be run on the interactive console for this test run.
// 	 */
// 	public String getCommand();
// 
// 	/**
// 	 * @return A String describing what this test run expects the tested class to print.
// 	 */
// 	public String getExpectedDescription();
// }


// Path: src/final2/subtests/PrintTest.java
import org.junit.Test;
import test.Input;
import test.runs.Run;

package final2.subtests;



/**
 * Checks the {@code print} command without running any other commands. Asserts that {@code print} works, which is
 * crucial for other tests to work.
 * 
 * @author Joshua Gleitze
 */
public class PrintTest extends LangtonSubtest {

	@Test
	public void correctInputFilePrintTest() {
		String[][] inputFiles = {
				PUBLIC_PRAKTOMAT_TEST_FILE_1,
				PUBLIC_PRAKTOMAT_TEST_FILE_2,
				PUBLIC_PRAKTOMAT_TEST_FILE_3,
				PUBLIC_PRAKTOMAT_TEST_FILE_4,
				TASK_SHEET_INPUT_FILE_1,
				TASK_SHEET_INPUT_FILE_2
		};

		runs = new Run[] {