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