public void DefineMethod()
{
DynamicObject dynobj = new DynamicObject();
ICommand body = new ReturnCommand(new VariableExpression("Name"));
Function function = new Function(null, body);
dynobj.SetValue("GetName", function);
object result = dynobj.GetValue("GetName");
Assert.IsNotNull(result);
Assert.IsInstanceOfType(result, typeof(ICallable));
Assert.IsTrue(result == function);
}