Beispiel #1
0
func TestCreditCards(t *testing.T) {
	for _, lang := range fake.GetLangs() {
		fake.SetLang(lang)

		v := fake.CreditCardType()
		if v == "" {
			t.Errorf("CreditCardType failed with lang %s", lang)
		}

		v = fake.CreditCardNum("")
		if v == "" {
			t.Errorf("CreditCardNum failed with lang %s", lang)
		}

		v = fake.CreditCardNum("visa")
		if v == "" {
			t.Errorf("CreditCardNum failed with lang %s", lang)
		}
	}
}
Beispiel #2
0
// CreditCardType returns one of the following credit values:
// VISA, MasterCard, American Express and Discover
func (s *Stabber) CreditCardType() string {
	return fake.CreditCardType()
}