Exemplo n.º 1
0
        public void simple_synchronous_call_getdisplaydata_returns_result()
        {
            TransactionClient      client = new TransactionClient();
            TransactionDisplayData result = client.GetDisplayData(Network.Doge, "6f47f0b2e1ec762698a9b62fa23b98881b03d052c9d8cb1d16bb0b04eb3b7c5b");

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Status == Consts.Success);
            Assert.IsTrue(result.Data.Txid == "6f47f0b2e1ec762698a9b62fa23b98881b03d052c9d8cb1d16bb0b04eb3b7c5b");
            Assert.IsTrue(result.Data.BlockNo == 191172);
            Assert.IsTrue(result.Data.Time == 1398122840);
            Assert.IsTrue(result.Data.Inputs.Count > 0);
            Assert.IsTrue(result.Data.Outputs.Count > 0);
        }
Exemplo n.º 2
0
        public void should_simple_synchronous_call_getblockdisplaydata_hash_with_bad_height_throws_exception()
        {
            TransactionClient client = new TransactionClient();
            Exception         ex     = null;

            try
            {
                client.GetDisplayData(Network.Doge, Consts.Wrong);
            }
            catch (Exception e)
            {
                ex = e;
            }
            Assert.IsNotNull(ex);
        }