public ConsolidationRepositoryIntegrationTests() { _tableName = "test" + Guid.NewGuid().ToString().Replace("-", ""); var cloudStorageAccount = CloudStorageAccount.Parse("UseDevelopmentStorage=true;"); var tableClient = cloudStorageAccount.CreateCloudTableClient(); _cloudTable = tableClient.GetTableReference(_tableName); _cloudTable.CreateIfNotExistsAsync().Wait(); _sut = new ConsolidationRepository(_cloudTable); }
public async Task RunAsync( [QueueTrigger("beyond-pod-raw-data", Connection = "AzureWebJobsStorage")] Models.BeyondPod.PodCast source, [Table("PodCasts", Connection = "AzureWebJobsStorage")] CloudTable destination, [Queue("new-podcast", Connection = "AzureWebJobsStorage")] ICollector <PodCast> podcastReadyToGo, ILogger log) { log.LogInformation("BeyondPodRawDataConsolidation: Processing Beyond Pod data"); try { var consolidationRepository = new ConsolidationRepository(destination); var newPodCastQueue = new NewPodCastQueue(podcastReadyToGo); await _handler.Process(source, consolidationRepository, newPodCastQueue, log); } catch (Exception ex) { log.LogError("BeyondPodRawDataConsolidation failed", ex); } log.LogInformation("BeyondPodRawDataConsolidation: Processing complete"); }