Пример #1
0
        public void WhenInvalidRGWithoutMaskThenShouldReturnFalse(string rg)
        {
            //Act
            bool result = RGUtil.ValidateRG(rg);

            //Assert
            Assert.IsFalse(result);
        }
Пример #2
0
        public void WhenValidRGWithMaskThenShouldReturnTrue(string rg)
        {
            //Act
            bool result = RGUtil.ValidateRG(rg);

            //Assert
            Assert.IsTrue(result);
        }
Пример #3
0
        public void WhenOnlyMaskCPFThenShouldReturnFalse()
        {
            //Act
            bool result = RGUtil.ValidateRG("..-");

            //Assert
            Assert.IsFalse(result);
        }
Пример #4
0
        public void WhenEmptyCPFThenShouldReturnFalse()
        {
            //Act
            bool result = RGUtil.ValidateRG(string.Empty);

            //Assert
            Assert.IsFalse(result);
        }
Пример #5
0
 public void WhenNullCPFThenShouldReturnFalse()
 {
     //Assert
     Assert.ThrowsException <ArgumentNullException>(() => RGUtil.ValidateRG(null));
 }