BusinessLogic.Tests.UnitTests.ModelsTests.UtilityTests.BasicDateRangeFilterTests.WhenCallingIsValid.ItReturnsFalseAndGivesAnErrorMessageIfTheToDateIsInTheFuture C# (CSharp) Method

ItReturnsFalseAndGivesAnErrorMessageIfTheToDateIsInTheFuture() private method

            public void ItReturnsFalseAndGivesAnErrorMessageIfTheToDateIsInTheFuture()
            {
                string errorMessage;
                filter.ToDate = DateTime.UtcNow.AddDays(2);

                bool isValid = filter.IsValid(out errorMessage);

                Assert.That(isValid, Is.EqualTo(false));
                Assert.That(errorMessage, Is.EqualTo("The 'Ending Date' cannot be in the future."));
            }
        }