예제 #1
0
        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);
        }
예제 #2
0
        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;
        }