Example #1
0
        public void InvalidExpiryDate_ArgumentOutOfRangeException()
        {
            //Arrange
            var validator = new InvalidExpiryDate(0, 0);

            //Act and Assert
            Assert.ThrowsException <ArgumentOutOfRangeException>(() => validator.Process(), "Invalid month and year to validate.");
        }
Example #2
0
        public void InvalidExpiryDate_Failed()
        {
            var month = DateTime.Now.Month;
            var year  = DateTime.Now.Year;
            //Arrange
            var validator = new InvalidExpiryDate(month, year);
            //Act
            var result = validator.Process();

            //Assert
            Assert.AreEqual(result.StatusCode, StatusCode.Failed);
            Assert.IsTrue(!string.IsNullOrEmpty(result.StatusDetail));
            Assert.IsTrue(!string.IsNullOrEmpty(result.Status));
        }