Ejemplo n.º 1
0
        public void WhenLinhaDigitavelIsInvalidWithMaskThenShouldReturnFalse(string linhaDigitavel)
        {
            //Act
            bool result = BoletoUtil.ValidateBoleto(linhaDigitavel);

            //Assert
            Assert.IsFalse(result);
        }
Ejemplo n.º 2
0
        public void WhenValidLinhaDigitavelWithMaskThenShouldReturnTrue(string boleto)
        {
            //Act
            bool result = BoletoUtil.ValidateBoleto(boleto);

            //Assert
            Assert.IsTrue(result);
        }
Ejemplo n.º 3
0
        public void WhenLinhaDigitavelLengthIsGreaterThan47CharThenShouldReturnFalse()
        {
            //Arrange
            var linhaDigitavel = new string('0', 48);;

            //Act
            bool result = BoletoUtil.ValidateBoleto(linhaDigitavel);

            //Assert
            Assert.IsFalse(result);
        }
Ejemplo n.º 4
0
        public void WhenLinhaDigitavelLengthIsLessThan47CharThenShouldReturnFalse()
        {
            //Arrange
            var linhaDigitavel = "123456789";

            //Act
            bool result = BoletoUtil.ValidateBoleto(linhaDigitavel);

            //Assert
            Assert.IsFalse(result);
        }
Ejemplo n.º 5
0
 public void WhenNullLinhaDigitavelThenShouldThrowArgumentNullException()
 {
     //Act
     Assert.ThrowsException <ArgumentNullException>(() => BoletoUtil.ValidateBoleto(null));
 }