public void TypeAccessorStructSetValueUsingInterfaceTest() { IAccessed obj = new AccessedStruct(); TypeAccessor accessor = obj.GetTypeAccessor(); accessor.SetValue(obj, "TextData", "Some text"); accessor.SetValue(obj, "IntegerData", 427); Assert.AreEqual("Some text", obj.TextData); Assert.AreEqual(427, obj.IntegerData); }
public void TypeAccessorStructGetValueTest() { AccessedStruct obj = new AccessedStruct(); TypeAccessor accessor = obj.GetTypeAccessor(); obj.TextData = "Some text"; obj.IntegerData = 427; Assert.AreEqual("Some text", accessor.GetValue(obj, "TextData")); Assert.AreEqual(427, accessor.GetValue(obj, "IntegerData")); }
public void TypeAccessorStructSetValueTest() { AccessedStruct obj = new AccessedStruct(); TypeAccessor accessor = obj.GetTypeAccessor(); accessor.SetValue(obj, "TextData", "Some text"); accessor.SetValue(obj, "IntegerData", 427); Assert.IsNull(obj.TextData); Assert.AreEqual(0, obj.IntegerData); }