public void TestWritePuzzle4x4() { string expected = "4\r\n1 2 3 4 \r\n4 2 - 1 \r\n- - - 2 \r\n3 - 2 - \r\n- 4 - 3 \r\n"; PuzzleWriter.WritePuzzle("testPuzzle.txt", puzzle); string actual = File.ReadAllText("testPuzzle.txt"); Assert.AreEqual(expected, actual); }
public void TestWritePuzzleNullPuzzle() { PuzzleWriter.WritePuzzle("testPuzzle.txt", null); Assert.IsFalse(File.Exists("testPuzzle.txt")); }
public void TestWritePuzzleNullFile() { PuzzleWriter.WritePuzzle(null, puzzle); }