public void SerializeBoolOrExpression() { var num = new LiteralExpression(1); var a = new BoolOrExpression(num, num); var b = Reserialize(a); Assert.AreEqual(a, b); }
private object Or(object l, object r) { var scope = new Scope(); scope.SetVar("l", l); scope.SetVar("r", r); var exp = new BoolOrExpression( new VariableExpression("l"), new VariableExpression("r") ); return(exp.Evaluate(scope, new Bindings()).AsObject()); }