public async Task ThenNBlocksWereMined( int numberOfBlocks) { for (var i = 0; i < numberOfBlocks; i++) { await _web3.MineBlockAsync(); } }
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>(); }