1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
package test
import (
"testing"
"github.com/icrowley/fake"
)
func TestProducts(t *testing.T) {
for _, lang := range fake.GetLangs() {
fake.SetLang(lang)
v := fake.Brand()
if v == "" {
t.Errorf("Brand failed with lang %s", lang)
}
v = fake.ProductName()
if v == "" {
t.Errorf("ProductName failed with lang %s", lang)
}
v = fake.Product()
if v == "" {
t.Errorf("Product failed with lang %s", lang)
}
v = fake.Model()
if v == "" {
t.Errorf("Model failed with lang %s", lang)
}
}
}
|