public void IsEmpty_TrueAfterClear() { // Arrange var tagHelperContent = new DefaultTagHelperContent(); // Act tagHelperContent.Clear(); // Assert Assert.True(tagHelperContent.IsEmpty); }
public void CanClearContent() { // Arrange var tagHelperContent = new DefaultTagHelperContent(); tagHelperContent.SetContent("Hello World"); // Act tagHelperContent.Clear(); // Assert Assert.True(tagHelperContent.IsEmpty); }
public void Fluent_Clear_Set_Append_WritesExpectedContent() { // Arrange var tagHelperContent = new DefaultTagHelperContent(); var expected = "HtmlEncode[[Hello ]]HtmlEncode[[World!]]"; tagHelperContent.SetContent("Some Random Content"); // Act tagHelperContent.Clear().SetContent("Hello ").Append("World!"); // Assert Assert.Equal(expected, tagHelperContent.GetContent(new CommonTestEncoder())); }
public void Fluent_Clear_Set_Append_WritesExpectedContent() { // Arrange var tagHelperContent = new DefaultTagHelperContent(); var expected = "HtmlEncode[[Hello ]]HtmlEncode[[World!]]"; tagHelperContent.SetContent("Some Random Content"); // Act tagHelperContent.Clear().SetContent("Hello ").Append("World!"); // Assert Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); }
public void CanClearContent() { // Arrange var tagHelperContent = new DefaultTagHelperContent(); tagHelperContent.SetContent("Hello World"); // Act tagHelperContent.Clear(); // Assert Assert.True(tagHelperContent.IsEmpty); }
public void IsEmpty_TrueAfterClear() { // Arrange var tagHelperContent = new DefaultTagHelperContent(); // Act tagHelperContent.Clear(); // Assert Assert.True(tagHelperContent.IsEmpty); }
public void Fluent_Clear_SetContent_WritesExpectedContent() { // Arrange var tagHelperContent = new DefaultTagHelperContent(); var expected = "HtmlEncode[[Hello World]]"; tagHelperContent.SetContent("Some Random Content"); // Act tagHelperContent.Clear().SetContent("Hello World"); // Assert Assert.Equal(expected, tagHelperContent.GetContent(new CommonTestEncoder())); }