public void ShouldAssignStructWithStructFromStructByName() { var structStructInstance = new structStruct { child = new testStruct { x = 1, y = 2, } }; Dictionary <string, object> inst = sStruct.AssignValuesFromObject(structStructInstance) as Dictionary <string, object>; Dictionary <string, object> childInst = inst["child"] as Dictionary <string, object>; Assert.AreEqual(1, childInst["x"]); Assert.AreEqual(2, childInst["y"]); }
public void ShouldAssignStructWithStructFromStructByName() { var structStructInstance = new structStruct { child = new testStruct { x = 1, y = 2, } }; Dictionary<string, object> inst = sStruct.AssignValuesFromObject(structStructInstance) as Dictionary<string, object>; Dictionary<string, object> childInst = inst["child"] as Dictionary<string, object>; Assert.AreEqual(1, childInst["x"]); Assert.AreEqual(2, childInst["y"]); }