コード例 #1
0
ファイル: Mutant.cs プロジェクト: stryker-mutator/stryker-net
 public void AnalyzeTestRun(ITestGuids failedTests, ITestGuids resultRanTests, ITestGuids timedOutTests)
 {
     if (CoveringTests.ContainsAny(failedTests))
     {
         ResultStatus = MutantStatus.Killed;
     }
     else if (resultRanTests.IsEveryTest || (MustRunAgainstAllTests is not true && CoveringTests.IsIncluded(resultRanTests)))
     {
         ResultStatus = MutantStatus.Survived;
     }
コード例 #2
0
 public static TestRunResult TimedOut(ITestGuids ranTests,
                                      ITestGuids failedTest,
                                      ITestGuids timedOutTests,
                                      string message,
                                      TimeSpan duration)
 {
     return(new TestRunResult(ranTests, failedTest, timedOutTests, message, duration)
     {
         SessionTimedOut = true
     });
 }
コード例 #3
0
 public TestRunResult(ITestGuids ranTests,
                      ITestGuids failedTests,
                      ITestGuids timedOutTest,
                      string message,
                      TimeSpan timeSpan)
 {
     RanTests      = ranTests;
     FailingTests  = failedTests;
     TimedOutTests = timedOutTest;
     ResultMessage = message;
     Duration      = timeSpan;
 }
コード例 #4
0
        public static ITestGuids MergeList(ITestGuids a, ITestGuids b)
        {
            if (a.GetGuids() == null)
            {
                return(b);
            }

            if (b.GetGuids() == null)
            {
                return(a);
            }

            return(new WrappedGuidsEnumeration(a.GetGuids().Union(b.GetGuids())));
        }
コード例 #5
0
 public bool ContainsAny(ITestGuids other)
 {
     if (other.IsEmpty || IsEmpty)
     {
         return(false);
     }
     if (IsEveryTest)
     {
         return(true);
     }
     if (other.IsEveryTest)
     {
         return(true);
     }
     return(_testsGuid.Overlaps(other.GetGuids()));
 }
コード例 #6
0
 public bool IsIncluded(ITestGuids test)
 {
     return(test.IsEveryTest || _testsGuid.IsSubsetOf(test.GetGuids()));
 }
コード例 #7
0
 public TestsGuidList Merge(ITestGuids other)
 {
     return(new TestsGuidList(_testsGuid.Union(other.GetGuids())));
 }