public static bool IsWomanByBornNumber(this string value)
 {
     return(BornNumberHelper.IsWoman(value));
 }
 public static bool IsValidBornNumber(this string value)
 {
     return(BornNumberHelper.IsValidBornNumber(value));
 }
예제 #3
0
        public void BornNumberIsWomanWithWomanReturnsTrue()
        {
            const string bornNumber = "895617/1234";

            Assert.AreEqual(true, BornNumberHelper.IsWoman(bornNumber));
        }
예제 #4
0
        public void BornNumberIsWomanThrowsWithInvalidNumber()
        {
            const string bornNumber = "asdasdsdfg";

            Assert.Throws <ArgumentException>(() => BornNumberHelper.IsWoman(bornNumber));
        }
예제 #5
0
        public void BornNumberIsWomanWithManReturnsFalse()
        {
            const string bornNumber = "890617/1234";

            Assert.AreEqual(false, BornNumberHelper.IsWoman(bornNumber));
        }
예제 #6
0
        public void InvalidBornNumberIsInvalid()
        {
            const string bornNumber = "890617/1234";

            Assert.AreEqual(false, BornNumberHelper.IsValidBornNumber(bornNumber));
        }
예제 #7
0
        public void OldBornNumberIsValid()
        {
            const string bornNumber = "490808/001";

            Assert.AreEqual(true, BornNumberHelper.IsValidBornNumber(bornNumber));
        }
예제 #8
0
        public void ValidBornNumberDateOnlyIsValid()
        {
            const string bornNumber = "890603/0000";

            Assert.AreEqual(true, BornNumberHelper.IsValidBornNumber(bornNumber));
        }
예제 #9
0
 public bool BornNumbersAreValid(string bornNumber)
 {
     return(BornNumberHelper.IsValidBornNumber(bornNumber));
 }