Esempio n. 1
0
        public void WhenInvalidRGWithoutMaskThenShouldReturnFalse(string rg)
        {
            //Act
            bool result = RGUtil.ValidateRG(rg);

            //Assert
            Assert.IsFalse(result);
        }
Esempio n. 2
0
        public void WhenValidRGWithMaskThenShouldReturnTrue(string rg)
        {
            //Act
            bool result = RGUtil.ValidateRG(rg);

            //Assert
            Assert.IsTrue(result);
        }
Esempio n. 3
0
        public void WhenOnlyMaskCPFThenShouldReturnFalse()
        {
            //Act
            bool result = RGUtil.ValidateRG("..-");

            //Assert
            Assert.IsFalse(result);
        }
Esempio n. 4
0
        public void WhenEmptyCPFThenShouldReturnFalse()
        {
            //Act
            bool result = RGUtil.ValidateRG(string.Empty);

            //Assert
            Assert.IsFalse(result);
        }
Esempio n. 5
0
 public void WhenNullCPFThenShouldReturnFalse()
 {
     //Assert
     Assert.ThrowsException <ArgumentNullException>(() => RGUtil.ValidateRG(null));
 }