Exemplo n.º 1
0
 public void InvokeGetProperty()
 {
     Rectangle rectangle = new Rectangle() { Width = 10, Height = 20 };
     object obj = DotNetObject.SendNativeMessage(null, rectangle, "width", null);
     Assert.AreEqual(10, obj);
 }
Exemplo n.º 2
0
 public void InvokeNativeGet()
 {
     Rectangle rectangle = new Rectangle() { Width = 10, Height = 20 };
     Assert.AreEqual(10, DotNetObject.SendNativeMessage(null, rectangle, "nget", new object[] { "Width" }));
     Assert.AreEqual(20, DotNetObject.SendNativeMessage(null, rectangle, "nget", new object[] { "Height" }));
 }
Exemplo n.º 3
0
 public void InvokeNativeSet()
 {
     Rectangle rectangle = new Rectangle() { Width = 10, Height = 20 };
     Assert.AreEqual(11, DotNetObject.SendNativeMessage(null, rectangle, "nsetput", new object[] { "Width", 11 }));
     Assert.AreEqual(21, DotNetObject.SendNativeMessage(null, rectangle, "nsetput", new object[] { "Height", 21 }));
     Assert.AreEqual(11, rectangle.Width);
     Assert.AreEqual(21, rectangle.Height);
 }