public void IsValid_WhenOnlyMaxValueSet_ThenAllowsAnyValueBelowIt()
        {
            var sut = new TimeSpanValidatorAttribute
            {
                MinValue = "00:00:01",
            };

            Assert.True(sut.IsValid(TimeSpan.FromSeconds(2)));
            Assert.True(sut.IsValid(TimeSpan.MaxValue));
            Assert.False(sut.IsValid(TimeSpan.FromSeconds(0)));
        }
        public void IsValid_WhenObjectNotTimeSpan_ReturnsFalse()
        {
            var sut    = new TimeSpanValidatorAttribute();
            var actual = sut.IsValid(new object());

            Assert.False(actual);
        }
        public void IsValid_WhenObjectIsNull_ReturnsTrue()
        {
            var sut    = new TimeSpanValidatorAttribute();
            var actual = sut.IsValid(null);

            Assert.True(actual);
        }
        public void IsValid_WhenTimeSpanOutsideRange_ReturnsFalse()
        {
            var sut = new TimeSpanValidatorAttribute
            {
                MinValue = TimeSpan.FromSeconds(1).ToString(),
                MaxValue = TimeSpan.FromSeconds(5).ToString(),
            };

            var actual = sut.IsValid(TimeSpan.FromSeconds(6));

            Assert.False(actual);
        }