AjScript.Tests.Interpreter.ParserTests.ParseTwoBinaryExpression C# (CSharp) Method

ParseTwoBinaryExpression() private method

private ParseTwoBinaryExpression ( ) : void
return void
        public void ParseTwoBinaryExpression()
        {
            IExpression expression = this.ParseExpression("a + 2 - 3");

            Assert.IsNotNull(expression);
            Assert.IsInstanceOfType(expression, typeof(ArithmeticBinaryExpression));

            ArithmeticBinaryExpression operation = (ArithmeticBinaryExpression)expression;

            Assert.AreEqual(ArithmeticOperator.Subtract, operation.Operation);
            Assert.IsNotNull(operation.LeftExpression);
            Assert.IsInstanceOfType(operation.LeftExpression, typeof(ArithmeticBinaryExpression));
            Assert.IsNotNull(operation.RightExpression);
            Assert.IsInstanceOfType(operation.RightExpression, typeof(ConstantExpression));
        }
ParserTests