public void When_NorContentFilesExists_Then_DefaulktContentIsUsed() { var file = new UploadFile(@"c:\foo\foo.png"); var pageContent = new VariablePageContent("wikitext", "default <%-1>", _helpers); var result = pageContent.ExpandedContent(file); Assert.That(result, Is.EqualTo("default foo.png")); }
public void When_JustFolderContentFilesExists_Then_FoledereLevelFileIsUsed() { A.CallTo(() => _helpers.FileExists(@"c:\foo\wikitext.wikitext")) .Returns(true); A.CallTo(() => _helpers.ReadAllText(@"c:\foo\wikitext.wikitext")) .Returns("File Contents <%-1>"); var file = new UploadFile(@"c:\foo\foo.png"); var pageContent = new VariablePageContent("wikitext", "default", _helpers); var result = pageContent.ExpandedContent(file); Assert.That(result, Is.EqualTo("File Contents foo.png")); }