Пример #1
0
        public void ShouldHaveHelpText()
        {
            var target = new AdditionalTimeoutInput();

            target.HelpText.ShouldBe(@"A timeout is calculated based on the initial unit test run before mutating.
To prevent infinite loops Stryker cancels a testrun if it runs longer than the timeout value.
If you experience a lot of timeouts you might need to increase the timeout value. | default: '5000'");
        }
Пример #2
0
        public void ShouldThrowAtNegative()
        {
            var target = new AdditionalTimeoutInput {
                SuppliedInput = -1
            };

            var exception = Should.Throw <InputException>(() => target.Validate());

            exception.Message.ShouldBe("Timeout cannot be negative.");
        }
Пример #3
0
        public void ShouldAllowMillion()
        {
            var target = new AdditionalTimeoutInput {
                SuppliedInput = 1000000
            };

            var result = target.Validate();

            result.ShouldBe(1000000);
        }
Пример #4
0
        public void ShouldHaveDefault()
        {
            var target = new AdditionalTimeoutInput {
                SuppliedInput = null
            };

            var result = target.Validate();

            result.ShouldBe(5000);
        }
Пример #5
0
        public void ShouldAllowZero()
        {
            var target = new AdditionalTimeoutInput {
                SuppliedInput = 0
            };

            var result = target.Validate();

            result.ShouldBe(0);
        }