TestcaseDetailsModel ITestViewerService.GetTestcaseDetails(int testsystemIndex, int testsuiteId, int testcaseId) { Testsuite testsuite = _testsuiteRepository.GetById(testsuiteId); TestcaseDetailsModel testcaseDetails = new TestcaseDetailsModel(); IList <Result> errorResultsOfTestsuite = _resultRepository.GetErrorResultsOfTestsuite(testsystemIndex, testsuite.Browsers, testsuite.Testcases.Where(t => t.ID == testcaseId).ToList(), testsuite.Languages); IList <ErrorOccurrenceGroup> errorOccurenceGroups = ErrorGrouping.GetErrorOccurrenceGroups(errorResultsOfTestsuite); if (errorOccurenceGroups.Any()) { testcaseDetails.ErrorOccurrenceGroup = errorOccurenceGroups.First(); } testcaseDetails.Testcase = _testcaseRepository.GetById(testcaseId); return(testcaseDetails); }
TestcaseDto ISettingsService.FindTestcaseByID(int testcaseId) { return(Mapper.Map <TestcaseDto>(_testcaseRepository.GetById(testcaseId))); }