public void TestCloseWithFileName()
 {
     _strategy = new XmlResultWriter(TEST_RESULT_FILE_NAME, _folderModel);
     _strategy.Close();
     Assert.IsTrue(_folderModel.Exists(TEST_RESULT_FILE_NAME));
     Assert.AreEqual("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<testResults />", _folderModel.GetPageContent(TEST_RESULT_FILE_NAME));
 }
Beispiel #2
0
 public void TestCloseWithFileName()
 {
     strategy = new XmlResultWriter(testResultFileName, folderModel);
     strategy.Close();
     Assert.IsTrue(folderModel.Exists(testResultFileName));
     Assert.AreEqual("<?xml version=\"1.0\" encoding=\"utf-16\"?>" + Environment.NewLine + "<testResults />", folderModel.GetPageContent(testResultFileName));
 }
Beispiel #3
0
        public void SetupAndTearDownAreNotCopiedToOutputDirectory()
        {
            AddTestFile(@"in\setup.html");
            AddTestFile(@"in\test.html");
            AddTestFile(@"in\teardown.html");

            RunSuite();

            Assert.IsTrue(folders.Exists(@"out\test.html"), "test.html should exist in output directory");

            Assert.IsFalse(folders.Exists(@"out\setup.html"), "setup.html should not exist in output directory");
            Assert.IsFalse(folders.Exists(@"out\teardown.html"), "teardown.html should not exist in output directory");
        }
Beispiel #4
0
        public void SetupAndTearDownAreNotCopiedToOutputDirectory()
        {
            AddTestFile("in", "setup.html");
            AddTestFile("in", "test.html");
            AddTestFile("in", "teardown.html");

            RunSuite();

            Assert.IsTrue(folders.Exists(System.IO.Path.Combine("out", "test.html")), "test.html should exist in output directory");

            Assert.IsFalse(folders.Exists(System.IO.Path.Combine("out", "setup.html")), "setup.html should not exist in output directory");
            Assert.IsFalse(folders.Exists(System.IO.Path.Combine("out", "teardown.html")), "teardown.html should not exist in output directory");
        }