AjScript.Tests.Interpreter.ParserTests.ParseSimpleBinaryExpression C# (CSharp) Метод

ParseSimpleBinaryExpression() приватный Метод

private ParseSimpleBinaryExpression ( ) : void
Результат void
        public void ParseSimpleBinaryExpression()
        {
            IExpression expression = this.ParseExpression("a + 2");

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

            ArithmeticBinaryExpression operation = (ArithmeticBinaryExpression)expression;

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