private APIErrorDetails GetErrorDetails(IEnumerable <ResultOfTest> apiDetails) { APIErrorDetails clientApiErrorDetails = new APIErrorDetails(); clientApiErrorDetails.ErrorDetails = new Collection <ErrorDetails>(); foreach (ResultOfTest apiDetail in apiDetails) { clientApiErrorDetails.ApiName = apiDetail.ApiName; if (apiDetail.State.Contains("Failed")) { ErrorDetails errorDetails = new ErrorDetails(); errorDetails.ErrorMessage = apiDetail.ErrorMessage; errorDetails.ErrorTime = apiDetail.StartTime; clientApiErrorDetails.ErrorDetails.Add(errorDetails); } } return(clientApiErrorDetails); }
private APIErrorDetails GetErrorDetails(IEnumerable<ResultOfTest> apiDetails) { APIErrorDetails clientApiErrorDetails = new APIErrorDetails(); clientApiErrorDetails.ErrorDetails = new Collection<ErrorDetails>(); foreach (ResultOfTest apiDetail in apiDetails) { clientApiErrorDetails.ApiName = apiDetail.ApiName; if (apiDetail.State.Contains("Failed")) { ErrorDetails errorDetails = new ErrorDetails(); errorDetails.ErrorMessage = apiDetail.ErrorMessage; errorDetails.ErrorTime = apiDetail.StartTime; clientApiErrorDetails.ErrorDetails.Add(errorDetails); } } return clientApiErrorDetails; }