public void DateOfBirth_GivenValidMaleIdentificationNumber_ReturnsDateOfBirth()
        {
            DateTime result = new RSAIdentificationNumberValidator().DateOfBirth(_validMaleIdentificationNumber);

            Assert.IsNotNull(result);
            Assert.AreEqual(1996, result.Year);
        }
Пример #2
0
 public ValidatorController(RSAIdentificationNumberValidator identificationNumberValidator, ValidatorService validatorService)
 {
     _identificationNumberValidator = identificationNumberValidator;
     _validatorService = validatorService;
 }
        public void IsFemale_GivenValidFemaleIdentificationNumber_ReturnTrue()
        {
            bool result = new RSAIdentificationNumberValidator().IsFemale(_validFemaleIdentificationNumber);

            Assert.IsTrue(result);
        }
 public void IsMale_GivenInvalidMaleIdentificationNumber_ThrowsException()
 {
     bool result = new RSAIdentificationNumberValidator().IsMale(_invalidMaleIdentificationNumber);
 }
 public void DateOfBirth_GivenInvalidMaleIdentificationNumber_ThrowsException()
 {
     DateTime result = new RSAIdentificationNumberValidator().DateOfBirth(_invalidMaleIdentificationNumber);
 }
        public void IsValid_GivenInvalidMaleIdentificationNumber_ReturnsFalse()
        {
            bool result = new RSAIdentificationNumberValidator().IsValid(_invalidMaleIdentificationNumber);

            Assert.IsFalse(result);
        }
        public void IsValid_GivenValidIdentificationNumber1_ReturnsTrue()
        {
            bool result = new RSAIdentificationNumberValidator().IsValid(_validIdentificationNumber1);

            Assert.IsTrue(result);
        }
Пример #8
0
 public ValidatorService(RSAIdentificationNumberValidator identificationNumberValidator)
 {
     _identificationNumberValidator = identificationNumberValidator;
 }