Ejemplo n.º 1
0
        public void test_THAT_includes_operation_IS_converted_to_expression_correctly()
        {
            var        op1  = new FieldRefOperand("Count");
            var        op2  = new IntegerValueOperand(1);
            var        op   = new IncludesOperation(null, op1, op2);
            Expression expr = op.ToExpression();

            Assert.That(expr.ToString(), Is.EqualTo("Convert(Convert(x.get_Item(\"Count\"))).Includes(Convert(1))"));
        }
Ejemplo n.º 2
0
        public void test_THAT_includes_operation_with_lookup_id_IS_converted_to_expression_correctly()
        {
            var attr = new List <KeyValuePair <string, string> >();

            attr.Add(new KeyValuePair <string, string>(Attributes.LookupId, "True"));
            var        op1  = new FieldRefOperand("Count", attr);
            var        op2  = new IntegerValueOperand(1);
            var        op   = new IncludesOperation(null, op1, op2);
            Expression expr = op.ToExpression();

            Assert.That(expr.ToString(), Is.EqualTo("Convert(Convert(x.get_Item(\"Count\"))).Includes(Convert(1), True)"));
        }