public void EvaluateUndefinedVariable() { Context context = new Context(); VariableExpression expr = new VariableExpression("foo"); Assert.IsNull(expr.Evaluate(context)); }
public void EvaluateDefinedVariable() { Context context = new Context(); context.SetValue("one", 1); VariableExpression expr = new VariableExpression("one"); Assert.AreEqual(1, expr.Evaluate(context)); Assert.AreEqual("one", expr.Name); }