public void TestWriteFinalCounts()
 {
     _strategy = new TextResultWriter(TEST_RESULT_FILE_NAME, _folderModel);
     _strategy.WriteFinalCount(TestUtils.MakeTestCounts());
     _strategy.Close();
     Assert.AreEqual("00000000000000000001000000000200000000030000000004", _folderModel.FileContent(TEST_RESULT_FILE_NAME));
 }
 public void TestWriteResults()
 {
     var pageResult = new PageResult("Test Page", "content", TestUtils.MakeTestCounts());
     _strategy = new TextResultWriter(TEST_RESULT_FILE_NAME, _folderModel);
     _strategy.WritePageResult(pageResult);
     _strategy.Close();
     Assert.AreEqual("0000000060Test Page\n1 right, 2 wrong, 3 ignored, 4 exceptions\ncontent\n", _folderModel.FileContent(TEST_RESULT_FILE_NAME));
 }
 public void TestCloseWithStandardOut()
 {
     _strategy = new TextResultWriter("stdout", _folderModel);
     _strategy.Close();
     Assert.IsFalse(_folderModel.FileExists(TEST_RESULT_FILE_NAME));
 }
 public void TestCloseWithFileName()
 {
     _strategy = new TextResultWriter(TEST_RESULT_FILE_NAME, _folderModel);
     _strategy.Close();
     Assert.IsTrue(_folderModel.FileExists(TEST_RESULT_FILE_NAME));
 }