Example #1
0
        public void CorrectValueFor_ConstantExpr_RefType()
        {
            var eval = new Evaluator();
            Expression<Func<bool>> expr = () => "test" == str;
            Expression leftExpr = (expr.Body as BinaryExpression).Left;

            object leftVal = eval.GetConstantVal(leftExpr);

            Assert.AreEqual(leftVal, "test");
        }