public static void UpdateTestSuiteStatusCount(TestSuiteStatus status) { int value = FilteredExplorer .GetFilteredTestSuites() .Where((Type ts) => TestSuiteExplorer.GetTestSuiteStatus(ts) == status) .Count(); if (tsStatus2count.ContainsKey(status)) { tsStatus2count[status] = value; } else { tsStatus2count.Add(status, value); } }
/// <summary> /// </summary> /// <param name="asm">Entry point</param> public static void ExploreAndRegisterTestSuites(Assembly asm) { foreach (Type testSuite in asm.GetTypes() .Where((Type type) => type.TryGetAttribute <TestSuite>() != null)) { try { Assembly2TestSuiteLink.RegisterTestSuite2Asm(testSuite, asm); IsValidTestSuite(testSuite); TestSuiteExplorer.SetTestSuiteStatus(testSuite, TestSuiteStatus.UNKNOWN); } catch (Exception e) { TestSuiteExplorer.SetTestSuiteError(testSuite, e.InnerException); TestSuiteExplorer.SetTestSuiteStatus(testSuite, TestSuiteStatus.SKIP); continue; } ExploreAndRegisterTests(testSuite); } }