public string RetrieveAboutContent() { string path = $@"{Directory.GetCurrentDirectory()}/README.md"; try { _logger.RetrievingContentForAboutPage(path); return(_repository.Retrieve(path)); } catch (Exception ex) { _logger.FailedToRetrieveContentForAboutPage(path, ex); throw; } }
public void FileSystemRepositoryReader_HtmlAdapterTest() { // Arrange string path = $@"{Directory.GetCurrentDirectory()}/Sample.md"; var markdigStub = new MarkdigConverter(new MarkdownPipelineBuilder()); var adapterStub = new HtmlPageDataAdapter(markdigStub); var repositoryStub = new FileSystemReadRepository <String>(adapterStub); // Act var resultMock = repositoryStub.Retrieve(path); // Assert resultMock.Should().StartWith("<h1"); }