public void Should_CreateThumbnails() { _request = new ThumbnailCreationRequest(VideoPath, GetThumbnailEveryNSeconds); var response = _service.Create(_request); response.IsValid.Should().BeTrue(); }
public int Act(CreateThumbnailsOptions options) { _correlationId = Guid.NewGuid().ToString(); var request = new ThumbnailCreationRequest(options.VideoFilePath, options.ThumbnailsEverySecond, _correlationId); var response = _thumbnailCreationService.Create(request); if (response.IsValid) { _auditor.AuditSuccess("VideoFile", options.VideoFilePath, "ThumbnailsCreated", response); } else { _auditor.AuditFailure("VideoFile", options.VideoFilePath, "ThumbnailCreationFailed", response); } return(response.IsValid ? 0 : 1); }
public ThumbnailCreateResponse Create(ThumbnailCreationRequest request) { _request = request; _response = new Response(request); try { CreateTry(); } catch (HqvException ex) { _response.AddError(ex); } catch (Exception ex) { const string message = "Unhandled exception in ThumbnailCreationNotAccurateService"; _response.AddError(new Exception(message, ex)); } return(_response); }
public Response(ThumbnailCreationRequest request) : base(request) { }