Exemplo n.º 1
0
        public async Task get_code_should_invoke_blockchain_bridge_get_code()
        {
            var code    = new byte[] { 0, 1, 2 };
            var address = TestItem.AddressA;

            _stateReader.GetCode(Arg.Any <Keccak>(), address).Returns(code);
            _blockFinder.Head.Returns(_anyBlock);
            var result = await _ndmBridge.GetCodeAsync(address);

            _stateReader.Received().GetCode(_anyBlock.StateRoot, address);
            result.Should().BeSameAs(code);
        }