Beispiel #1
0
        public void ParameterExpressionIsExpected()
        {
            IExpressionNode actual = TestObject.Build(TestParameterExpression);

            ParameterNode actualNode = actual.VerifyIsActually <ParameterNode>();

            Assert.AreSame(TestParameterExpression, actualNode.SourceExpression);
        }
Beispiel #2
0
        public void ConstantExpressionIsExpected()
        {
            IExpressionNode actual = TestObject.Build(TestConstantOne);

            ConstantNode actualNode = actual.VerifyIsActually <ConstantNode>();

            Assert.AreSame(TestConstantOne, actualNode.SourceExpression);
        }
Beispiel #3
0
        public void LambdaExpressionBodyIsExpected()
        {
            IExpressionNode actual = TestObject.Build(TestLambdaExpression);

            LambdaNode   actualNode = actual.VerifyIsActually <LambdaNode>();
            ConstantNode bodyNode   = actualNode.Body.VerifyIsActually <ConstantNode>();

            Assert.AreSame(TestConstantZero, bodyNode.SourceExpression);
        }
Beispiel #4
0
        public void ConvertExpressionHasExpectedOperand()
        {
            IExpressionNode actual = TestObject.Build(TestConvertExpression);

            ConvertNode  actualNode  = actual.VerifyIsActually <ConvertNode>();
            ConstantNode operandNode = actualNode.Operand.VerifyIsActually <ConstantNode>();

            Assert.AreSame(TestConstantOne, operandNode.SourceExpression);
        }
Beispiel #5
0
        public void ModuloExpressionHasExpectedRight()
        {
            IExpressionNode actual = TestObject.Build(TestModuloExpression);

            ModuloNode   actualNode = actual.VerifyIsActually <ModuloNode>();
            ConstantNode rightNode  = actualNode.Right.VerifyIsActually <ConstantNode>();

            Assert.AreSame(TestConstantOne, rightNode.SourceExpression);
        }
Beispiel #6
0
        public void ModuloExpressionHasExpectedLeft()
        {
            IExpressionNode actual = TestObject.Build(TestModuloExpression);

            ModuloNode   actualNode = actual.VerifyIsActually <ModuloNode>();
            ConstantNode leftNode   = actualNode.Left.VerifyIsActually <ConstantNode>();

            Assert.AreSame(TestConstantZero, leftNode.SourceExpression);
        }
Beispiel #7
0
        public void GreaterThanOrEqualExpressionHasExpectedRight()
        {
            IExpressionNode actual = TestObject.Build(TestGreaterThanOrEqualExpression);

            GreaterThanOrEqualNode actualNode = actual.VerifyIsActually <GreaterThanOrEqualNode>();
            ConstantNode           rightNode  = actualNode.Right.VerifyIsActually <ConstantNode>();

            Assert.AreSame(TestConstantOne, rightNode.SourceExpression);
        }
Beispiel #8
0
        public void MemberAccessExpressionHasExpectedExpression()
        {
            IExpressionNode actual = TestObject.Build(TestMemberAccessExpression);

            MemberAccessNode actualNode     = actual.VerifyIsActually <MemberAccessNode>();
            ParameterNode    expressionNode = actualNode.Expression.VerifyIsActually <ParameterNode>();

            Assert.AreSame(TestParameterExpression, expressionNode.SourceExpression);
        }
Beispiel #9
0
        public void LambdaExpressionIsExpected()
        {
            Expression testExpression = TestLambdaExpression;

            IExpressionNode actual = TestObject.Build(testExpression);

            LambdaNode actualNode = actual.VerifyIsActually <LambdaNode>();

            Assert.AreSame(testExpression, actualNode.SourceExpression);
        }
Beispiel #10
0
        public void ModuloExpressionIsExpected()
        {
            Expression testExpression = TestModuloExpression;

            IExpressionNode actual = TestObject.Build(testExpression);

            ModuloNode actualNode = actual.VerifyIsActually <ModuloNode>();

            Assert.AreSame(testExpression, actualNode.SourceExpression);
        }
Beispiel #11
0
        public void GreaterThanOrEqualExpressionIsExpected()
        {
            Expression testExpression = TestGreaterThanOrEqualExpression;

            IExpressionNode actual = TestObject.Build(testExpression);

            GreaterThanOrEqualNode actualNode = actual.VerifyIsActually <GreaterThanOrEqualNode>();

            Assert.AreSame(testExpression, actualNode.SourceExpression);
        }