public void testFileHandler_readFileAsString_invalid() { String expectedString = "empty"; fileHandler fh = new file_handler.fileHandler(); Assert.AreEqual(expectedString, fh.readFileAsString()); }
public void testFileHandler_readFileAsString_valid() { String expectedString = "4 2 - 1\n- - -2\n3 - 2 -\n- 4 - 3"; fileHandler fh = new file_handler.fileHandler(); fh.getFileName("4x4.txt"); Assert.AreEqual(Regex.Replace(expectedString, @"[\u000A\u000B\u000C\u000D\u2028\u2029\u0085 ]+", String.Empty), Regex.Replace(fh.readFileAsString(), @"[\u000A\u000B\u000C\u000D\u2028\u2029\u0085 ]+", String.Empty)); }