Exemple #1
0
        public void NoTransformationTest()
        {
            Expression <Func <int, int> > source = (p) => p - 2;

            var actual = new TransformExpressionVisitor().VisitAndConvert(source, "");

            Assert.IsNotNull(actual);
            Assert.AreEqual("p => (p - 2)", actual.ToString());
        }
Exemple #2
0
        public void TransformToDecrementTest()
        {
            Expression <Func <int, int> > source = (p) => p - 1;

            var actual = new TransformExpressionVisitor().VisitAndConvert(source, "");

            Assert.IsNotNull(actual);
            Assert.AreEqual("p => Decrement(p)", actual.ToString());
        }