public void WhenLinhaDigitavelMaskIsInValidThenValidateMaskShouldReturnTrue(string mask) { //Act bool validMask = BoletoUtil.ValidateMask(mask); Assert.IsFalse(validMask); }
public void WhenValidLinhaDigitavelWithMaskThenShouldReturnTrue(string boleto) { //Act bool result = BoletoUtil.ValidateBoleto(boleto); //Assert Assert.IsTrue(result); }
public void WhenLinhaDigitavelIsInvalidWithMaskThenShouldReturnFalse(string linhaDigitavel) { //Act bool result = BoletoUtil.ValidateBoleto(linhaDigitavel); //Assert Assert.IsFalse(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 WhenLinhaDigitavelIsNullThenValidateMaskShouldThrowArgumentNullException() { Assert.ThrowsException <ArgumentNullException>(() => BoletoUtil.ValidateMask(null)); }
public void WhenLinhaDigitavelLengthIsLessThan47ThenGenerateBarCodeTextShouldThrowArgumentOutOfRangeException() { Assert.ThrowsException <ArgumentOutOfRangeException>(() => BoletoUtil.GenerateBarCodeText("1234567890")); }
public void WhenLinhaDigitavelLengthIsGreaterThan47ThenGenerateBarCodeTextShouldThrowArgumentOutOfRangeException() { Assert.ThrowsException <ArgumentOutOfRangeException>(() => BoletoUtil.GenerateBarCodeText(new string('0', 48))); }
public void WhenLinhaDigitavelIsNullThenGenerateBarCodeTextShouldThrowArgumentNullException() { Assert.ThrowsException <ArgumentNullException>(() => BoletoUtil.GenerateBarCodeText(null)); }
public void WhenNullLinhaDigitavelThenShouldThrowArgumentNullException() { //Act Assert.ThrowsException <ArgumentNullException>(() => BoletoUtil.ValidateBoleto(null)); }