Beispiel #1
0
        public void ShouldThrowAtNegative()
        {
            var target = new AdditionalTimeoutInput {
                SuppliedInput = -1
            };

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

            exception.Message.ShouldBe("Timeout cannot be negative.");
        }
Beispiel #2
0
        public void ShouldHaveDefault()
        {
            var target = new AdditionalTimeoutInput {
                SuppliedInput = null
            };

            var result = target.Validate();

            result.ShouldBe(5000);
        }
Beispiel #3
0
        public void ShouldAllowMillion()
        {
            var target = new AdditionalTimeoutInput {
                SuppliedInput = 1000000
            };

            var result = target.Validate();

            result.ShouldBe(1000000);
        }
Beispiel #4
0
        public void ShouldAllowZero()
        {
            var target = new AdditionalTimeoutInput {
                SuppliedInput = 0
            };

            var result = target.Validate();

            result.ShouldBe(0);
        }