public void ValidateShouldReturnTrueGivenCleared()
        {
            var subject = new GlobalFilterCriteria();

            Assert.IsTrue(subject.Cleared);
            Assert.IsTrue(subject.Validate(this.validationMessages));
        }
        public void ValidateShouldThrowGivenNullValidationMessages()
        {
            var subject = new GlobalFilterCriteria {
                BeginDate = new DateTime(), EndDate = DateTime.Now
            };

            Assert.IsFalse(subject.Validate(null));
        }
        public void ValidateShouldReturnTrueGivenDatesButNoAccount()
        {
            var subject = new GlobalFilterCriteria {
                BeginDate = DateTime.Today.AddDays(-1), EndDate = DateTime.Now
            };

            Assert.IsFalse(subject.Cleared);
            Assert.IsTrue(subject.Validate(this.validationMessages));
        }
        public void ValidateShouldReturnFalseGivenEndDateIsNull()
        {
            var subject = new GlobalFilterCriteria {
                BeginDate = DateTime.Today.AddDays(-1), EndDate = DateTime.Now
            };

            subject.EndDate = null;
            Assert.IsFalse(subject.Validate(this.validationMessages));
        }