public void ShouldAssignStructWithMapByName() { var mStructInstance = new mapStruct { map = new Dictionary <string, bool> { { "value", true } } }; Dictionary <string, object> inst = mStruct.AssignValuesFromObject(mStructInstance) as Dictionary <string, object>; Dictionary <object, object> m = inst["map"] as Dictionary <object, object>; Assert.AreEqual("value", m.Keys.ElementAt(0)); Assert.AreEqual(true, m.Values.ElementAt(0)); }
public void ShouldAssignStructWithMapByName() { var mStructInstance = new mapStruct { map = new Dictionary<string, bool> { {"value", true} } }; Dictionary<string, object> inst = mStruct.AssignValuesFromObject(mStructInstance) as Dictionary<string, object>; Dictionary<object, object> m = inst["map"] as Dictionary<object, object>; Assert.AreEqual("value", m.Keys.ElementAt(0)); Assert.AreEqual(true, m.Values.ElementAt(0)); }