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