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"))); }
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"))); }
private string GetTearDown() { StoryTestFile file = FindFile(name => name.IsTearDown); return(file == null ? string.Empty : file.Content); }
private string GetSetUp() { StoryTestFile file = FindFile(name => name.IsSetUp); return(file == null ? string.Empty : file.Content); }