Exemple #1
0
        public async Task request_eth_should_return_true()
        {
            var address = TestItem.AddressA;
            var value   = 1.Ether();

            _ethRequestService.TryRequestEthAsync(address, value).Returns(FaucetResponse.RequestCompleted(null));
            var result = await _rpc.ndm_requestEth(address);

            await _ethRequestService.Received().TryRequestEthAsync(address, value);

            result.Data.Status.Should().Be(FaucetRequestStatus.RequestCompleted.ToString());
        }
Exemple #2
0
        public async Task request_eth_should_fail_for_missing_faucet_peer()
        {
            var ethRequested = await _ethRequestService.TryRequestEthAsync(Address.Zero, 1);

            ethRequested.Should().BeFalse();
        }