コード例 #1
0
        public void OptionsValidator_ShouldThrowValidationExceptionOnFalseBuildConfigValues(string fakeReporter)
        {
            var target  = new StrykerOptionsValidator();
            var options = new StrykerOptions("C:/ExampleProject/", fakeReporter, null);

            Assert.Throws <ValidationException>(() => target.Validate(options));
        }
コード例 #2
0
        public void OptionsValidator_ShouldThrowValidationExceptionOnEmptyBasePathValues(string basePath)
        {
            var target  = new StrykerOptionsValidator();
            var options = new StrykerOptions(basePath, null, null, null, null);

            Assert.Throws <ValidationException>(() => target.Validate(options));
        }
コード例 #3
0
        public void OptionsValidator_ShouldAcceptReporterValues(string reporter)
        {
            var target  = new StrykerOptionsValidator();
            var options = new StrykerOptions("C:/ExampleProject/", reporter, null);

            var result = target.Validate(options);

            // Should default to Console
            result.Reporter.ShouldBe(string.IsNullOrWhiteSpace(reporter) ? "Console" : reporter);
        }