public void Converter_Escapes_Quotes() { var lines = new[] { "text with 'quotes'" }; var accessWrapper = new FileAccessWrapperSpy(lines); var result = new HtmlPagesConverter(accessWrapper) .ConvertToHtml(); result.Should().Be("text with "quotes"<br />"); }
public void Converter_Creates_LineBreaks() { var lines = new[] { "plain text" }; var accessWrapper = new FileAccessWrapperSpy(lines); var result = new HtmlPagesConverter(accessWrapper) .ConvertToHtml(); result.Should().Be("plain text<br />"); }
public void Converter_CanConvert_EmptyFile() { var lines = new string[0]; var accessWrapper = new FileAccessWrapperSpy(lines); var result = new HtmlPagesConverter(accessWrapper) .ConvertToHtml(); result.Should().BeEmpty(); }
public void UsingRealFileToTestConvertion() { var fileName = "aFile.txt"; var file = File.CreateText(fileName); file.WriteLine("plain text"); file.Close(); var testee = new HtmlPagesConverter( new FileSystemAccessWrapper( fileName)); var convertedText = testee.ConvertToHtml(); convertedText.Should().Be("plain text<br />"); }