public void simple_synchronous_call_getreceivedtx_returns_result_with_proxy() { AddressClient client = new AddressClient(); OutputTx result = client.GetReceivedTx(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_getreceivedtx_with_bad_address_throws_exception() { AddressClient client = new AddressClient(); ExceptionWithMessage <AddressAfterTxError> typedException = null; try { client.GetReceivedTx(Network.Doge, Consts.Wrong, "e83d147c3bcd87c6efd5270896a179f6ecb1de8b8c8cc324645c5a14129baf8c"); } 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 == "Return 100 transactions that occurred after this Transaction ID"); }