private void ThenOptionChildElementShouldHaveConditionalSelectAttributeFor(string resourceValueExpr)
        {
            var expected = new ConditionalExpression(StubSyntaxProvider.GetTestNulLCheckAndEvalFor(resourceValueExpr),
                                                     resourceValueExpr);
            IAttribute attribute = Context.ElementTarget.Elements.Cast <TestElement>().First().GetAttribute("selected");

            attribute.ShouldBe <TestAttributeNode>();
            attribute.As <TestAttributeNode>().ConditionalExpressionNodes.First().ConditionalExpression.ShouldEqual(expected);
        }
Exemple #2
0
        private void ThenNewAttributeShouldHaveConditionalNodeWithNullCheckFor(string value)
        {
            ConditionalExpression expected = new ConditionalExpression(StubSyntaxProvider.GetTestNulLCheckAndEvalFor(value), value);

            Context.NewAttribute.As <TestAttributeNode>().ConditionalExpressionNodes.Single().As <TestConditionalExpressionNode>().ConditionalExpression.ShouldEqual(expected);
        }