public void ShouldRemoveInnerText() { TestElement element = InternalTestNodes.TestElement("foo").WithAttribute("for", "resource.Stuff"); element.AddTextElement("this is the inner text"); GivenElementTarget(element); WhenActionCalledOnElement(); ThenThenElementShouldContainNoInnerTextNodes(); }
public void ShouldNotReplaceInnerTextIfHasNoForAttribute() { TestElement element = InternalTestNodes.TestElement("foo"); element.AddTextElement("this is the inner text"); GivenElementTarget(element); WhenActionCalledOnElement(); ThenTheInnerTextShouldBe("this is the inner text"); }
public void ShouldAddInnerTextWithResourceExpression() { TestElement element = InternalTestNodes.TestElement("foo").WithAttribute("for", "resource.Stuff"); element.AddTextElement("this is the inner text"); GivenElementTarget(element); WhenActionCalledOnElement(); ThenThenElementShouldContainConditional("resource.Stuff", StubSyntaxProvider.GetTestNullCheckExpression("resource")); }