Exemple #1
0
        public void OddEvenTheStringIsNull_ReturnFalse()
        {
            //Arrange
            IChecker checker = new  OddEvenChecker();

            //Act
            bool isNull = checker.Validate(null);

            //Assert
            Assert.False(isNull);
        }
Exemple #2
0
        public void OddEvenTheStringIsOnlyNumbers_ReturnTrue()
        {
            //Arrange
            IChecker checker = new OddEvenChecker();

            //Act
            bool isOnlyNumbersAndEven = checker.Validate("1234567890");

            //Assert
            Assert.True(isOnlyNumbersAndEven);
        }
Exemple #3
0
        public void OddEvenTheStringIsOdd_ReturnFalse()
        {
            //Arrange
            IChecker checker = new  OddEvenChecker();

            //Act
            bool isOdd = checker.Validate("99");

            //Assert
            Assert.False(isOdd);
        }
Exemple #4
0
        public void OddEvenTheStringIsNotOnlyNumbers_ReturnTrue()
        {
            //Arrange
            IChecker checker = new  OddEvenChecker();

            //Act
            bool isOnlyNumbers = checker.Validate("12ab34cd");

            //Assert
            Assert.True(isOnlyNumbers);
        }
Exemple #5
0
        public void OddEvenTheStringIsEven_ReturnTrue()
        {
            //Arrange
            IChecker checker = new  OddEvenChecker();

            //Act
            bool isEven = checker.Validate("100");

            //Assert
            Assert.True(isEven);
        }