Пример #1
0
        public async Task TestSubscribeCommand()
        {
            var tcs = new TaskCompletionSource <ResultMessage>();

            client.Subscibe(new CallMessage("blockchain.address.get_history",
                                            new[] { "mrx4EmF6zHXky3zDoeJ1K7KvYcuNn8Mmc4" }), r =>
            {
                tcs.SetResult(r);
            });

            var msg = await tcs.Task;

            Assert.AreEqual(msg.Result[0].Value <string>("tx_hash"),
                            "3aa2a5a9825ca767e092bcc19487aa13969eeb217fd0fba8492543bbb8c30954");
            Assert.AreEqual(msg.Result[0].Value <int>("height"), 260144);
        }