private void GetaccountNumber_Valid_Input_Return_Correct_Value( ICountry country, string bban, string accountNumber) { var valueGot = BbanSplitterValidValidation.GetAccountNumber(country, bban); Assert.AreEqual(accountNumber, valueGot); }
public void GetAccountNumber_Expected_InvalidCountryException(string iban) { var bban = GetBbanFromIBan(iban); Action action1 = () => BbanSplitterValidValidation.GetAccountNumber(null, bban); TestUtil.ExpectedException <InvalidCountryException>(action1); Action action2 = () => BbanSplitterInvalidValidation.GetAccountNumber(null, bban); TestUtil.ExpectedException <InvalidCountryException>(action2); }
public void GetAccountNumber_It_Is_Not_Possible_To_Extract_The_Field_Expected_InvalidIbanException(string iban) { var country = new Mock <ICountry>(); country .Setup(x => x.AccountNumberPosition) .Returns(5); country .Setup(x => x.AccountNumberLength) .Returns(5); Action action = () => BbanSplitterValidValidation.GetAccountNumber( country.Object, iban); TestUtil.ExpectedException <BbanSplitterException>(action); }