public void simple_synchronous_call_getreceivedvalue_returns_result_with_proxy() { AddressClient client = new AddressClient(); ReceivedValue result = client.GetReceivedValue(Network.Doge, "DFundmtrigzA6E25Swr2pRe4Eb79bGP8G1"); Assert.IsNotNull(result); Assert.IsTrue(result.Status == Consts.Success); Assert.IsTrue(result.Data.Address == "DFundmtrigzA6E25Swr2pRe4Eb79bGP8G1"); }
public void should_simple_synchronous_call_getreceivedvalue_with_bad_address_throws_exception() { AddressClient client = new AddressClient(); ExceptionWithMessage <AddressReceivedValueError> typedException = null; try { client.GetReceivedValue(Network.Doge, Consts.Wrong); } catch (Exception e) { typedException = e?.InnerException as ExceptionWithMessage <AddressReceivedValueError>; } Assert.IsNotNull(typedException); Assert.IsNotNull(typedException.ErrorMessage); Assert.IsTrue(typedException.ErrorMessage.Status == Consts.Fail); Assert.IsTrue(typedException.ErrorMessage.Data.Address == Consts.ValidAddressRequired); }