public void SerializeDeserialize_IntsAndStrings_WorksCorrectly() { var p = new XMLDictPersister <int, string>(); var data = p.Serialize(_dict2); var res = p.Deserialize(data); foreach (var kvp in res) { Assert.AreEqual(kvp.Value, _dict2[kvp.Key]); } }
public void DeserializeDeserialize_IntAndAs_WorksCorrectly() { var p = new XMLDictPersister <int, A>(); var data = p.Serialize(_dict3); var res = p.Deserialize(data); foreach (var kvp in res) { Assert.AreEqual(kvp.Value.Id, _dict3[kvp.Key].Id); } }
public void SerializeDeserialize_StringsAndInts_WorksCorrectly() { var p = new XMLDictPersister <string, int>(); var data = p.Serialize(_dict1); var res = p.Deserialize(data); Assert.IsNotNull(res); Assert.AreEqual(_dict1.Count, res.Count); foreach (var kvp in res) { Assert.AreEqual(kvp.Value, _dict1[kvp.Key]); } }