public void TestDeserializeZipCode() { string json = Request.GetString(new Uri("https://viacep.com.br/ws/01001000/json/")); ZipCodeItem zipCodeItem = Deserialize.ConvertTo <ZipCodeItem>(json); ZipCodeResult zipCodeResult = new ZipCodeResult(zipCodeItem); Assert.IsInstanceOfType(zipCodeItem.GetType(), typeof(ZipCodeItem).GetType()); Assert.IsTrue(zipCodeResult); Assert.IsTrue(zipCodeResult.IsValid); }
private ZipCodeResult GetConvertResult(string json) { ZipCodeItem value = Deserialize.ConvertTo <ZipCodeItem>(json); return(new ZipCodeResult(value)); }
private AddressCodeResult GetConvertResult(string json) { AddressCodeItem values = Deserialize.ConvertTo <AddressCodeItem>(json); return(new AddressCodeResult(values)); }