Beispiel #1
0
 public void SetAndGetInstanceVariable()
 {
     IObject obj = new BaseObject(type);
     obj.SetValue("name", "Adam");
     Assert.AreEqual("Adam", obj.GetValue("name"));
 }
Beispiel #2
0
 public void RaiseWhenSetUndefinedVariable()
 {
     IObject obj = new BaseObject(type);
     obj.SetValue("length", 100);
 }
Beispiel #3
0
 public void RaiseWhenInvokeUndefinedMethod()
 {
     IObject obj = new BaseObject(type);
     obj.Invoke("getLength", null, null);
 }
Beispiel #4
0
 public void InvokeGetName()
 {
     IObject obj = new BaseObject(type);
     obj.SetValue("name", "Adam");
     Assert.AreEqual("Adam", obj.Invoke("getName", null, null));
 }
Beispiel #5
0
 public void GetObjectType()
 {
     IObject obj = new BaseObject(this.type);
     Assert.AreEqual(this.type, obj.Type);
 }
Beispiel #6
0
 public void GetInstanceVariableAsNull()
 {
     IObject obj = new BaseObject(type);
     Assert.IsNull(obj.GetValue("name"));
 }