public void InvokeNativeMethod()
{
DynamicObject dynobj = new DynamicObject();
ICommand body = new ReturnCommand(new VariableExpression("Name"));
Function function = new Function(null, body);
dynobj.SetValue("Name", "Adam");
object result = dynobj.Invoke("GetValue", new object[] { "Name" });
Assert.IsNotNull(result);
Assert.IsInstanceOfType(result, typeof(string));
Assert.AreEqual("Adam", result);
}