public void TestMemberAccess()
        {
            Expression <Func <Customer, String> > exp = sutpfex.Execute <String>(new[] { "Name" });
            Func <Customer, String> f = exp.Compile();

            Assert.That(f(aCustomer), Is.EqualTo("Gian Maria"));
        }
        public void TestInnerMemberAccess()
        {
            PostfixExpressionToLambda <Order>  sut = new PostfixExpressionToLambda <Order>();
            Expression <Func <Order, String> > exp = sut.Execute <String>(new[] { "Customer", "Name", "." });
            Func <Order, String> f = exp.Compile();

            Assert.That(f(aOrder), Is.EqualTo("Roberto"));
        }
        public static Expression <Func <T, P1, U> > ParseToExpression <T, P1, U>(String expression)
        {
            StringAdvancedTokenizer tokenizer = new StringAdvancedTokenizer(opchecker);
            ExpressionConverterExt <String, String, String> converter =
                new ExpressionConverterExt <String, String, String>(
                    opchecker, tokenizer, tokenConverter);
            IList <String> postfix = converter.InfixToPostfix(expression);
            PostfixExpressionToLambda <T> executor = new PostfixExpressionToLambda <T>();

            return(executor.Execute <P1, U>(postfix));
        }
 public void TestInnerMemberAccess()
 {
     PostfixExpressionToLambda<Order> sut = new PostfixExpressionToLambda<Order>();
     Expression<Func<Order, String>> exp = sut.Execute<String>(new[] { "Customer", "Name", "." });
     Func<Order, String> f = exp.Compile();
     Assert.That(f(aOrder), Is.EqualTo("Roberto"));
 }