public void Upload_ShouldInvokeCloudStorageFactoryCreateAzureBlobContainerOnce() { // Arrange var formFile = CreateFormFile(); var guid = Guid.Empty; // Act _cloudStorageService.Upload(formFile, guid); // Assert _cloudStorageFactoryMock.Verify(v => v.CreateAzureBlobContainer(), Times.Once); }
public async Task <JobDto> ExecuteProcess(IFormFile formFile) { var guid = Guid.NewGuid(); var job = _jobsService.Create(formFile.FileName, guid); await _cloudStorageService.Upload(formFile, guid); await _queueService.Publish(job); return(_jobsService.UpdateStatusQueued(job)); }