public async Task IndexingTransferFunctions() { using (var azureSearchService = new AzureSearchService(AzureSearchServiceName, _azureSearchApiKey)) { await azureSearchService.DeleteIndexAsync(AzureTransferIndexName); using (var azureFunctionMessageIndexer = await azureSearchService.GetOrCreateFunctionIndex <TransferFunction>(indexName: AzureTransferIndexName)) { var transferHandler = new FunctionIndexTransactionHandler <TransferFunction>(azureFunctionMessageIndexer); var web3 = new Web3.Web3("https://rinkeby.infura.io/v3/25e7b6dfc51040b3bfc0e47317d38f60"); var blockchainProxy = new BlockchainProxyService(web3); var handlers = new HandlerContainer { TransactionHandler = transferHandler }; var blockProcessor = BlockProcessorFactory.Create(blockchainProxy, handlers); var processingStrategy = new ProcessingStrategy(blockProcessor); var blockchainProcessor = new BlockchainProcessor(processingStrategy); var blockRange = new BlockRange(3146684, 3146694); await blockchainProcessor.ProcessAsync(blockRange); await Task.Delay(TimeSpan.FromSeconds(5)); //ensure we have written the expected docs to the index Assert.Equal(3, await azureFunctionMessageIndexer.DocumentCountAsync()); } await azureSearchService.DeleteIndexAsync(AzureTransferIndexName); } }