예제 #1
0
        public void ShouldThrowOnInvalidOptimizationMode()
        {
            var target = new CoverageAnalysisInput {
                SuppliedInput = "gibberish"
            };

            var exception = Assert.Throws <InputException>(() => target.Validate());

            exception.Message.ShouldBe($"Incorrect coverageAnalysis option (gibberish). The options are [Off, All, PerTest or PerTestInIsolation].");
        }
예제 #2
0
        public void ShouldHaveHelpText()
        {
            var target = new CoverageAnalysisInput();

            target.HelpText.ShouldBe(@"Use coverage info to speed up execution. Possible values are: off, all, perTest, perIsolatedTest.
    - off: coverage data is not captured.
    - perTest (Default): capture the list of mutations covered by each test. For every mutation that has tests, only the tests that cover this mutation are tested. Fastest option.
    - all: capture the list of mutations covered by each test. Test only these mutations. Fast option.
    - perTestInIsolation: like 'perTest', but running each test in an isolated run. Slowest fast option. | default: 'perTest'");
        }
예제 #3
0
        public void ShouldSetFlags(string value, params OptimizationModes[] expectedFlags)
        {
            var target = new CoverageAnalysisInput {
                SuppliedInput = value
            };

            var result = target.Validate();

            foreach (var flag in expectedFlags)
            {
                result.HasFlag(flag).ShouldBeTrue();
            }
        }