public void Should_RunApp_Successfully() { GivenAValidSetup(); _result = _app.RunAsync(_appPath, _appArguments).Result; _result.ErrorData.Should().BeNullOrEmpty(); _result.OutputData.Should().Contain("yahoo.com"); }
private async Task DownloadTry() { var extension = _request.OutputExtension; if (!extension.StartsWith(".")) { extension = "." + extension; } var outputFilePath = Path.Combine(_config.SavePath, _request.OutputFileName + extension); _response.FfmpegArguments = $"-i {_request.Url} -c copy {outputFilePath}"; _commandLineApplicationAsync = new CommandLineApplicationAsync(); var result = await _commandLineApplicationAsync.RunAsync( _config.FfmpegPath, _response.FfmpegArguments, CreateProgress(), _request.CancellationToken); _response.StandardError = result.ErrorData; _response.StandardOutput = result.OutputData; _response.ResultCode = result.ResultCode; if (_response.ResultCode != 0) { throw new HqvException("Application result code is not successful"); } }