public void TestDateOfBirth()
        {
            var id = "9107220306085";
            DateOfBirth dob = new DateOfBirth(id);

            Assert.AreEqual("1991-07-22",dob.ToString());
            Assert.AreEqual("July",dob.Month);
            Assert.AreEqual(dob.MonthOfBirth,7);
            Assert.AreEqual(dob.YearOfBirth,1991);
            Assert.AreEqual(dob.DayOfBirth,22);

        }
Exemplo n.º 2
0
        public SysIdentity(string idNumber)
        {
                _idNumber = idNumber;
                _intIdNumber = new int[13];

                int index = 0;
                foreach (var digit in _idNumber.ToCharArray())
                {
                    _intIdNumber[index++] = Convert.ToInt32(digit.ToString());
                }

                _birthDate = new DateOfBirth(_idNumber);
            
        }