コード例 #1
0
        public void testComplexArgumentAssignment()
        {
            String      statement = "\"person\" + p.name as value";
            ETestParser parser    = new ETestParser(statement, false);
            Argument    ars       = parser.parse_argument_assignment();

            Assert.AreEqual("value", ars.GetName());
            IExpression exp = ars.getExpression();

            Assert.IsTrue(exp is PlusExpression);
            Assert.AreEqual("\"person\" + p.name as value", generate(ars));
        }
コード例 #2
0
        public void testSimpleArgumentAssignment()
        {
            String      statement = "p.name as value";
            ETestParser parser    = new ETestParser(statement, false);
            Argument    ars       = parser.parse_argument_assignment();

            Assert.AreEqual("value", ars.GetName());
            IExpression exp = ars.getExpression();

            Assert.IsNotNull(exp);
            Assert.AreEqual("p.name as value", generate(ars));
        }