public void OnDeserializedMethod_Sets_HumanAddress_To_Null_For_Empty_HumanAddressJsonString_Member(string input) { var locationColumn = new LocationColumn() { HumanAddressJsonString = input }; Assert.IsNull(locationColumn.HumanAddress); locationColumn.OnDeserializedMethod(new StreamingContext()); Assert.IsNull(locationColumn.HumanAddress); }
public void OnDeserializedMethod_Sets_HumanAddress_Member_From_HumanAddressJsonString_Member() { var locationColumn = new LocationColumn() { HumanAddressJsonString = json }; Assert.IsNull(locationColumn.HumanAddress); locationColumn.OnDeserializedMethod(new StreamingContext()); Assert.IsNotNull(locationColumn.HumanAddress); Assert.AreEqual(address, locationColumn.HumanAddress.Address); Assert.AreEqual(city, locationColumn.HumanAddress.City); Assert.AreEqual(state, locationColumn.HumanAddress.State); Assert.AreEqual(zip, locationColumn.HumanAddress.Zip); }