コード例 #1
0
        public void TestMobileValid()
        {
            //Arrange
            string test = "0912345678";

            bool expected = true;

            //Act
            ICustomValidation format = new MobileFormatValidation();
            bool result = format.Validate(test);

            //Assert
            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public void TestMobileInvalid()
        {
            //Arrange
            string test = "123893427932";

            bool expected = false;

            //Act
            ICustomValidation format = new MobileFormatValidation();
            bool result = format.Validate(test);

            //Assert
            Assert.AreEqual(expected, result);
        }