public void Builder_SetContent_String() { // Arrange var builder = new TestHtmlContentBuilder(); builder.Append("Existing Content. Will be Cleared."); // Act builder.SetContent("Hi"); // Assert Assert.Collection( builder.Entries, entry => Assert.Equal("Hi", Assert.IsType <UnencodedString>(entry).Value)); }
public void Builder_SetContent_IHtmlContent() { // Arrange var builder = new TestHtmlContentBuilder(); builder.Append("Existing Content. Will be Cleared."); var content = new OtherHtmlContent("Hi"); // Act builder.SetContent(content); // Assert Assert.Collection( builder.Entries, entry => Assert.Same(content, entry)); }
public void Builder_SetContent_IHtmlContent() { // Arrange var builder = new TestHtmlContentBuilder(); builder.Append("Existing Content. Will be Cleared."); var content = new OtherHtmlContent("Hi"); // Act builder.SetContent(content); // Assert Assert.Collection( builder.Entries, entry => Assert.Same(content, entry)); }
public void Builder_SetContent_String() { // Arrange var builder = new TestHtmlContentBuilder(); builder.Append("Existing Content. Will be Cleared."); // Act builder.SetContent("Hi"); // Assert Assert.Collection( builder.Entries, entry => Assert.Equal("Hi", Assert.IsType<UnencodedString>(entry).Value)); }