public void Method()
        {
            var dog = new ASample();
            Expression<Func<string>> temp = () => dog.NoParameters();
            var visitor = new ValidationExpressionVisitor();
            visitor.Visit(temp);

            Assert.AreEqual("dog.NoParameters()", visitor.Expression);
        }
        public void ChainedProps_And_Methods()
        {
            var dog = new ASample { Thing = new BSample { Prop = 20f } };
            Expression<Func<string>> temp = () => dog.Thing.DoSomething();
            var visitor = new ValidationExpressionVisitor();
            visitor.Visit(temp);

            Assert.AreEqual("dog.Thing.DoSomething()", visitor.Expression);
        }
        public void ChainedProps()
        {
            var dog = new ASample { Thing = new BSample { Prop = 20 } };
            Expression<Func<float>> temp = () => dog.Thing.Prop;
            var visitor = new ValidationExpressionVisitor();
            visitor.Visit(temp);

            Assert.AreEqual("dog.Thing.Prop", visitor.Expression);
        }
Exemplo n.º 4
0
        public void Method()
        {
            var dog = new ASample();
            Expression <Func <string> > temp = () => dog.NoParameters();
            var visitor = new ValidationExpressionVisitor();

            visitor.Visit(temp);

            Assert.AreEqual("dog.NoParameters()", visitor.Expression);
        }
Exemplo n.º 5
0
        public void ChainedProps_And_Methods()
        {
            var dog = new ASample {
                Thing = new BSample {
                    Prop = 20f
                }
            };
            Expression <Func <string> > temp = () => dog.Thing.DoSomething();
            var visitor = new ValidationExpressionVisitor();

            visitor.Visit(temp);

            Assert.AreEqual("dog.Thing.DoSomething()", visitor.Expression);
        }
Exemplo n.º 6
0
        public void ChainedProps()
        {
            var dog = new ASample {
                Thing = new BSample {
                    Prop = 20
                }
            };
            Expression <Func <float> > temp = () => dog.Thing.Prop;
            var visitor = new ValidationExpressionVisitor();

            visitor.Visit(temp);

            Assert.AreEqual("dog.Thing.Prop", visitor.Expression);
        }