public void WhenLinhaDigitavelIsInvalidWithMaskThenShouldReturnFalse(string linhaDigitavel) { //Act bool result = BoletoUtil.ValidateBoleto(linhaDigitavel); //Assert Assert.IsFalse(result); }
public void WhenValidLinhaDigitavelWithMaskThenShouldReturnTrue(string boleto) { //Act bool result = BoletoUtil.ValidateBoleto(boleto); //Assert Assert.IsTrue(result); }
public void WhenLinhaDigitavelLengthIsGreaterThan47CharThenShouldReturnFalse() { //Arrange var linhaDigitavel = new string('0', 48);; //Act bool result = BoletoUtil.ValidateBoleto(linhaDigitavel); //Assert Assert.IsFalse(result); }
public void WhenLinhaDigitavelLengthIsLessThan47CharThenShouldReturnFalse() { //Arrange var linhaDigitavel = "123456789"; //Act bool result = BoletoUtil.ValidateBoleto(linhaDigitavel); //Assert Assert.IsFalse(result); }
public void WhenNullLinhaDigitavelThenShouldThrowArgumentNullException() { //Act Assert.ThrowsException <ArgumentNullException>(() => BoletoUtil.ValidateBoleto(null)); }