public void UiDateTimeNotInPastValidationTestPasses()
        {
            var model = new ValidationTestUiDateTimeRangeModel
            {
                BasicDateRange = new UiDateTimeRangeModel(_timeZoneName)
                {
                    StartDateTime = new UiDateTimeModel(_timeZoneName)
                    {
                        LocalDate = "1/14/2100"
                    }
                }
            };
            var testContext = new ValidationContext(model, null, null)
            {
                DisplayName = "BasicDateRange"
            };
            var attribute = new UiDateTimeNotInPastValidation("StartDateTime.LocalDate");

            try
            {
                attribute.Validate(model.BasicDateRange.StartDateTime.LocalDate, testContext);
            }
            catch (Exception ex)
            {
                Assert.Fail("Unexpected Exception thrown: " + ex.Message);
            }
        }
        public void UiDateTimeNotInPastValidationTestFails()
        {
            var model = new ValidationTestUiDateTimeRangeModel
            {
                BasicDateRange = new UiDateTimeRangeModel(_timeZoneName)
                {
                    StartDateTime = new UiDateTimeModel(_timeZoneName)
                    {
                        LocalDate = "12/14/2009"
                    }
                }
            };
            var testContext = new ValidationContext(model, null, null)
            {
                DisplayName = "BasicDateRange"
            };
            var attribute = new UiDateTimeNotInPastValidation("StartDateTime.LocalDate");

            try
            {
                attribute.Validate(model.BasicDateRange.StartDateTime.LocalDate, testContext);

                Assert.Fail("Exception not thrown");
            }
            catch (ValidationException ex)
            {
                Assert.AreEqual("'Date' must be in the future.", ex.Message);
            }
            catch (Exception)
            {
                Assert.Fail("Unexpected Exception thrown");
            }
        }