예제 #1
0
        public void ShouldRemoveInnerText()
        {
            TestElement element = InternalTestNodes.TestElement("foo").WithAttribute("for", "resource.Stuff");

            element.AddTextElement("this is the inner text");
            GivenElementTarget(element);
            WhenActionCalledOnElement();
            ThenThenElementShouldContainNoInnerTextNodes();
        }
예제 #2
0
        public void ShouldNotReplaceInnerTextIfHasNoForAttribute()
        {
            TestElement element = InternalTestNodes.TestElement("foo");

            element.AddTextElement("this is the inner text");
            GivenElementTarget(element);
            WhenActionCalledOnElement();
            ThenTheInnerTextShouldBe("this is the inner text");
        }
예제 #3
0
        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"));
        }