public void IsValid()
        {
            var      attribute    = new MustBeInTheFutureAttribute();
            DateTime?dateNullable = new DateTime(2018, 3, 4);

            Assert.AreEqual(true, attribute.IsValid(null));
            Assert.AreEqual(true, attribute.IsValid(DBNull.Value));
            Assert.AreEqual(false, attribute.IsValid(DateTime.Today));
            Assert.AreEqual(false, attribute.IsValid(DateTime.Now.AddMinutes(-1)));
            Assert.AreEqual(true, attribute.IsValid(DateTime.Now.AddMinutes(1)));
            Assert.AreEqual(false, attribute.IsValid(DateTime.Today as DateTime?));
            Assert.AreEqual(true, attribute.IsValid(null as DateTime?));
            Assert.AreEqual(false, attribute.IsValid(dateNullable));
        }
        public void IsValidFail(object value)
        {
            var attribute = new MustBeInTheFutureAttribute();

            try
            {
                attribute.IsValid(value);

                Assert.Fail();
            }
            catch (ArgumentException ex)
            {
                Assert.AreEqual("Value must be of type DateTime.", ex.Message);
            }
        }