public void ShouldAssignStructFromClassWithFieldsByName() { var fieldClassInstance = new testClassFields { x = 1, y = 2 }; Dictionary <string, object> inst = intStruct.AssignValuesFromObject(fieldClassInstance) as Dictionary <string, object>; Assert.AreEqual(1, inst["x"]); Assert.AreEqual(2, inst["y"]); }
public void ShouldAssignStructFromClassWithFieldsByName() { var fieldClassInstance = new testClassFields { x = 1, y = 2 }; Dictionary<string, object> inst = intStruct.AssignValuesFromObject(fieldClassInstance) as Dictionary<string, object>; Assert.AreEqual(1, inst["x"]); Assert.AreEqual(2, inst["y"]); }