AjErl.Tests.Expressions.MatchExpressionTests.MatchVariableWithInteger C# (CSharp) Method

MatchVariableWithInteger() private method

private MatchVariableWithInteger ( ) : void
return void
        public void MatchVariableWithInteger()
        {
            Context context = new Context();
            Variable variable = new Variable("X");
            MatchExpression expr = new MatchExpression(new VariableExpression(variable), new ConstantExpression(123));

            Assert.AreEqual(123, expr.Evaluate(context));

            Assert.AreEqual(123, context.GetValue("X"));
        }