Inheritance: StoryTestPage
Esempio n. 1
0
 static void CheckResult(string content, string expected) {
     var folder = new FolderTestModel();
     var memory = new TypeDictionary();
     memory.GetItem<Settings>().OutputFolder = "output";
     var file = new StoryTestFile("myfile", new StoryTestFolder(memory, folder), folder);
     file.WriteTest(new PageResult("title", content, new TestCounts()));
     Assert.AreEqual(expected, folder.GetPageContent(new FilePath("output\\myfile.html")));
 }
Esempio n. 2
0
 static void CheckResult(string content, string expected)
 {
     Clock.Instance = new TestClock {Now = new DateTime(2016, 1, 2, 13, 14, 15)};
     var folder = new FolderTestModel();
     var memory = new TypeDictionary();
     memory.GetItem<Settings>().OutputFolder = "output";
     var file = new StoryTestFile("myfile", new StoryTestFolder(memory, folder), folder);
     file.WriteTest(new PageResult("title", content, new TestCounts()));
     Clock.Instance = new Clock();
     Assert.AreEqual(comment + expected, folder.GetPageContent(new FilePath("output\\myfile.html")));
 }
Esempio n. 3
0
        private string GetTearDown()
        {
            StoryTestFile file = FindFile(name => name.IsTearDown);

            return(file == null ? string.Empty : file.Content);
        }
Esempio n. 4
0
        private string GetSetUp()
        {
            StoryTestFile file = FindFile(name => name.IsSetUp);

            return(file == null ? string.Empty : file.Content);
        }