コード例 #1
0
 protected void Given_a_partially_tested_app_in_which_multiple_mutants_survive_for_a_syntax_node()
 {
     MockTestRunner.Setup(x => x.RunTests(It.IsAny <IEnumerable <string> >(), It.IsAny <IEnumerable <string> >()))
     .Returns(new TestRunResult {
         Status = TestRunStatus.AllTestsPassed
     });
 }
コード例 #2
0
 protected void Given_a_fully_tested_app_in_which_no_mutants_will_survive()
 {
     MockTestRunner.Setup(x => x.RunTests(It.IsAny <IEnumerable <string> >(), It.IsAny <IEnumerable <string> >()))
     .Returns(new TestRunResult {
         Status = TestRunStatus.SomeTestsFailed
     });
 }
コード例 #3
0
        protected void Given_a_partially_tested_app_in_which_a_mutant_will_survive()
        {
            var wasCalled = false;

            Func <TestRunResult> returnValueFunction = () =>
            {
                if (!wasCalled)
                {
                    wasCalled = true;
                    return(new TestRunResult {
                        Status = TestRunStatus.AllTestsPassed
                    });
                }

                return(new TestRunResult {
                    Status = TestRunStatus.SomeTestsFailed
                });
            };

            MockTestRunner.Setup(x => x.RunAllTests(It.IsAny <IEnumerable <string> >()))
            .Returns(returnValueFunction);

            MockTestRunner.Setup(x => x.RunTests(It.IsAny <IEnumerable <string> >(), It.IsAny <IEnumerable <string> >()))
            .Returns(returnValueFunction);
        }