示例#1
0
 public async Task ThenNBlocksWereMined(
     int numberOfBlocks)
 {
     for (var i = 0; i < numberOfBlocks; i++)
     {
         await _web3.MineBlockAsync();
     }
 }
示例#2
0
        public async Task ThenBlockchainOperationIsCompletedAfterNBlocks(
            int numberOfBlocks)
        {
            for (var i = 0; i < numberOfBlocks; i++)
            {
                await _web3.MineBlockAsync();
            }

            var blockchainOperation = _scenarioContext.GetCallResult <BlockchainOperation>();

            await blockchainOperation.WaitForExecutionAsync();

            var blockchainOperationState = await blockchainOperation.GetCurrentStateAsync();


            blockchainOperationState
            .ShouldBeOfType <BlockchainOperationState.Completed>();
        }