public void NewInstance() { ObjectFunction function = new ObjectFunction(null); object instance = function.NewInstance(null); Assert.IsNotNull(instance); Assert.IsInstanceOfType(instance, typeof(DynamicObject)); }
public void EvaluateObject() { Context context = new Context(); var objfn = new ObjectFunction(context); context.SetValue("Object", objfn); InstanceOfExpression expr = new InstanceOfExpression(new ConstantExpression(objfn.NewInstance(null)), new VariableExpression("Object")); var result = expr.Evaluate(context); Assert.IsNotNull(result); Assert.AreEqual(true, result); }