public void AppendHtml_DoesNotGetWrittenAsEncoded() { // Arrange var content = new BufferedHtmlContent(); content.AppendHtml("Hello"); var writer = new StringWriter(); // Act content.WriteTo(writer, new CommonTestEncoder()); // Assert Assert.Equal("Hello", writer.ToString()); }
public void AppendHtml_DoesNotGetWrittenAsEncoded() { // Arrange var content = new BufferedHtmlContent(); content.AppendHtml("Hello"); var writer = new StringWriter(); // Act content.WriteTo(writer, new CommonTestEncoder()); // Assert Assert.Equal("Hello", writer.ToString()); }
public void WriteTo_WritesAllItems() { // Arrange var content = new BufferedHtmlContent(); var writer = new StringWriter(); content.Append(new TestHtmlContent("Hello")); content.Append("Test"); // Act content.WriteTo(writer, new CommonTestEncoder()); // Assert Assert.Equal(2, content.Entries.Count); Assert.Equal("Written from TestHtmlContent: HelloHtmlEncode[[Test]]", writer.ToString()); }
public void WriteTo_WritesAllItems() { // Arrange var content = new BufferedHtmlContent(); var writer = new StringWriter(); content.Append(new TestHtmlContent("Hello")); content.Append("Test"); // Act content.WriteTo(writer, new CommonTestEncoder()); // Assert Assert.Equal(2, content.Entries.Count); Assert.Equal("Written from TestHtmlContent: HelloHtmlEncode[[Test]]", writer.ToString()); }