Example #1
0
        public void WhenTransferDateIsPast_ThenValidatorFails()
        {
            var sut      = new DateNotPastValidator_Testable(new FakeDateTimeService());
            var transfer = new MakeTransfer {
                Date = presentDate.AddDays(-1)
            };

            Assert.AreEqual(false, sut.IsValid(transfer));
        }
Example #2
0
        public bool WhenTransferDateIsPast_ThenValidationFails(int offset)
        {
            var sut          = new DateNotPastValidator_Testable(new FakeDateTimeService());
            var transferDate = presentDate.AddDays(offset);
            var transfer     = new MakeTransfer {
                Date = transferDate
            };

            return(sut.IsValid(transfer));
        }