コード例 #1
0
        public void IsFamilyTelNumberTest()
        {
            var familyService = new FamilyService();

            Assert.IsFalse(familyService.IsFamilyTelNumber("090-1234-1234"));

            familyService.AppendFamilyTelNumber("090-1234-1234");
            Assert.IsTrue(familyService.IsFamilyTelNumber("090-1234-1234"));
            Assert.IsFalse(familyService.IsFamilyTelNumber("090-1234-4321"));
        }
コード例 #2
0
        public void CheckServiceTest()
        {
            var familyService = new FamilyService();

            familyService.CheckService(new Record("2 E1"));
            Assert.IsFalse(familyService.IsJoined());

            familyService.CheckService(new Record("2 C1 090-1234-0001"));
            Assert.IsTrue(familyService.IsJoined());
            Assert.IsTrue(familyService.IsFamilyTelNumber("090-1234-0001"));
        }