public ProviderVenueQualification( IProviderVenueQualificationFileImportService fileImportService, IRepository <FunctionLog> functionLogRepository, IHttpContextAccessor httpContextAccessor) { _fileImportService = fileImportService; _functionLogRepository = functionLogRepository; _httpContextAccessor = httpContextAccessor; }
public When_ImportProviderVenueQualification_Function_Blob_Trigger_Fires() { var blobStream = Substitute.For <ICloudBlob>(); blobStream.OpenReadAsync(null, null, null).Returns(new MemoryStream()); var context = new ExecutionContext(); var logger = Substitute.For <ILogger>(); var httpContextAccessor = Substitute.For <IHttpContextAccessor>(); _functionLogRepository = Substitute.For <IRepository <FunctionLog> >(); _fileImportService = Substitute.For <IProviderVenueQualificationFileImportService>(); var providerVenueQualification = new Functions.ProviderVenueQualification(_fileImportService, _functionLogRepository, httpContextAccessor); providerVenueQualification.ImportProviderVenueQualification( blobStream, "test", context, logger ).GetAwaiter().GetResult(); }