private void ShowAverageResultSummary(string type, List <AverageResultEntity> list)
        {
            int exceptionsCount = 0;

            foreach (AverageResultEntity a in list)
            {
                foreach (TestResultEntity t in a.TestResults)
                {
                    if (t.Exception != null)
                    {
                        exceptionsCount++;
                    }
                }
            }

            TestTypeLabel.Text       = type;
            CountLabel.Text          = list.Sum(t => t.TestResults.Count()).ToString();
            ExceptionCountLabel.Text = exceptionsCount.ToString();

            StatusPanel.Status = (StatusPanel.StatusEnum)(int) QuickTestLogic.GetStatus(list);
        }
        private AverageResultEntity GetAverageResultEntity(List <TestResultEntity> testList, string url, int count)
        {
            AverageResultEntity result = new AverageResultEntity();

            result.Name          = "Test " + (++_testCount).ToString();
            result.Url           = url;
            result.NumberOfTests = count;
            result.Type          = "Read";
            result.TestResults   = testList;

            double average = 0;

            foreach (TestResultEntity t in result.TestResults)
            {
                average += t.ResponseTime;
            }

            result.AverageResponseTime = average / result.TestResults.Count();
            result.Status = QuickTestLogic.GetStatus(result.TestResults);

            return(result);
        }