public void Deserialize_TypeNull_ReturnsNull() { var subject = new Serializer(); var result = subject.Deserialize(null, new Dictionary<string, object>()); Assert.IsNull(result); }
public void Deserialize_SetsFieldFromDictionary(string expected) { var subject = new Serializer(); var values = CreateDictionary("PublicField", expected); var result = (SerializationTarget)subject.Deserialize(typeof(SerializationTarget), values); Assert.AreEqual(expected, result.PublicField); }
public void Deserialize_String_GetsValueFromDictionary(string expected) { var subject = new Serializer(); var values = new Dictionary<string, object>(); values["Value"] = expected; var result = subject.Deserialize(typeof(string), values); Assert.AreEqual(expected, result); }