public bool Testcase(DateTime effectivefrom, DateTime effectiveto)
        {
            // Arrange
            var sut = new LarsStandard
            {
                EffectiveFrom = effectivefrom,
                EffectiveTo   = effectiveto
            };

            // Act
            return(sut.IsValidDate(DateTime.UtcNow));
        }
        public void ShouldBeInvalidIfTheEndDateIsInThePast()
        {
            // Arrange
            var sut = new LarsStandard
            {
                EffectiveFrom = DateTime.MaxValue,
                EffectiveTo   = DateTime.UtcNow.AddYears(-1)
            };

            // Act
            var result = sut.IsValidDate(DateTime.UtcNow);

            // Assert
            Assert.IsFalse(result);
        }
        public void ShouldBeInvalidIfTheStartDateIsInTheFuture()
        {
            // Arrange
            var sut = new LarsStandard
            {
                EffectiveFrom = DateTime.MaxValue,
                EffectiveTo   = null
            };

            // Act
            var result = sut.IsValidDate(DateTime.UtcNow);

            // Assert
            Assert.IsFalse(result);
        }
        public void ShouldBeInvalidIfItHasNoStartDate()
        {
            // Arrange
            var sut = new LarsStandard
            {
                EffectiveFrom = null,
                EffectiveTo   = null
            };

            // Act
            var result = sut.IsValidDate(DateTime.UtcNow);

            // Assert
            Assert.IsFalse(result);
        }
        public void ShouldBeValidIfTheStartDateisTodayAndEndDateIsInFuture()
        {
            // Arrange
            var sut = new LarsStandard
            {
                EffectiveFrom = DateTime.UtcNow,
                EffectiveTo   = DateTime.MaxValue
            };

            // Act
            var result = sut.IsValidDate(DateTime.UtcNow);

            // Assert
            Assert.IsTrue(result);
        }
        public void ShouldBeValidIfItHasNoEndDate()
        {
            // Arrange
            var sut = new LarsStandard
            {
                EffectiveFrom = DateTime.MinValue,
                EffectiveTo   = null
            };

            // Act
            var result = sut.IsValidDate(DateTime.UtcNow);

            // Assert
            Assert.IsTrue(result);
        }