Exemplo n.º 1
0
func TestInvalidIBAN(t *testing.T) {
	for _, ibanTestNumber := range invalidIBANTestNumbers {
		_, err := iban.NewIBAN(ibanTestNumber.number)
		if err == nil {
			t.Error("No error was thrown for an invalid IBAN number!")
		}
	}
}
Exemplo n.º 2
0
func TestValidIBAN(t *testing.T) {
	for _, ibanTestNumber := range validIBANTestNumbers {
		result, err := iban.NewIBAN(ibanTestNumber.number)
		if err != nil || result == (iban.IBAN{}) {
			t.Error("No object was created!")
			t.Log(err)
		}
	}
}