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