public void simple_synchronous_call_getunspenttx_returns_result_with_proxy() { AddressClient client = new AddressClient(); OutputTx result = client.GetUnspentTx(Network.Doge, "DRapidDiBYggT1zdrELnVhNDqyAHn89cRi", "e83d147c3bcd87c6efd5270896a179f6ecb1de8b8c8cc324645c5a14129baf8c"); Assert.IsNotNull(result); Assert.IsTrue(result.Status == Consts.Success); Assert.IsTrue(result.Data.Address == "DRapidDiBYggT1zdrELnVhNDqyAHn89cRi"); }
public void should_simple_synchronous_call_getunspenttx_with_bad_address_throws_exception() { AddressClient client = new AddressClient(); ExceptionWithMessage <AddressAfterTxError> typedException = null; try { client.GetUnspentTx(Network.Doge, Consts.Wrong); } catch (Exception e) { typedException = e?.InnerException as ExceptionWithMessage <AddressAfterTxError>; } Assert.IsNotNull(typedException); Assert.IsNotNull(typedException.ErrorMessage); Assert.IsTrue(typedException.ErrorMessage.Status == Consts.Fail); Assert.IsTrue(typedException.ErrorMessage.Data.AfterTx == "Get unspent transactions after this transaction ID."); }