private JsonReaderUtil <T> GetJsonReaderCore <T>(string urlPath, Func <JsonReader, T> func, bool pretty = false, string tree = null, int?depth = null) { var util = new JsonReaderUtil <T>(func); var request = GetJsonRestRequest(urlPath, pretty, tree, depth); request.ResponseWriter = util.Run; util.Response = _restClient.Execute(request); return(util); }
private List <string> GetFailedTestCasesCore(JsonReaderUtil <List <string> > util) { if (util.Succeeded) { return(util.Value); } // In the case there is no test file then simply return an empty list. This is common in jobs that // don't produce proper files. if (util.Response.StatusCode == HttpStatusCode.NotFound) { return(new List <string>()); } if (util.Exception != null) { throw util.Exception; } throw new Exception($"Unexpected error parsing test results: {util.Response.StatusCode}"); }