Exemplo n.º 1
0
        public async Task SendTransactionAsync_Success()
        {
            TransactionsReceivedEvent received = null;

            _eventBus.Subscribe <TransactionsReceivedEvent>(t =>
            {
                received = t;
                return(Task.CompletedTask);
            });
            var transactions = await _osTestHelper.GenerateTransferTransactions(1);

            await _grpcPeer.SendTransactionAsync(transactions.First());

            received.ShouldNotBeNull();
            received.Transactions.Count().ShouldBe(1);
            received.Transactions.First().From.ShouldBe(transactions.First().From);
        }