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); }
public void OnSerializingMethod_Sets_HumanAddressJsonString_Member_From_HumanAddress_Member() { var locationColumn = new LocationColumn() { HumanAddress = new HumanAddress() { Address = address, City = city, State = state, Zip = zip } }; Assert.IsNull(locationColumn.HumanAddressJsonString); locationColumn.OnSerializingMethod(new StreamingContext()); Assert.AreEqual(json, locationColumn.HumanAddressJsonString); }