add tests

This commit is contained in:
Simon Vieille 2024-03-20 11:48:12 +01:00
parent f4946b3c08
commit 2db8cc1087
Signed by: deblan
GPG key ID: 579388D585F70417

25
faker/faker_test.go Normal file
View file

@ -0,0 +1,25 @@
package faker
import (
"testing"
)
func TestIsValidFaker(t *testing.T) {
manager := NewFakeManager()
if !manager.IsValidFaker("") {
t.Fatalf("TestIsValidFaker: empty faker check failed")
}
if !manager.IsValidFaker("_") {
t.Fatalf("TestIsValidFaker: _ faker check failed")
}
if !manager.IsValidFaker("address") {
t.Fatalf("TestIsValidFaker: address faker check failed")
}
if manager.IsValidFaker("unknown_faker") {
t.Fatalf("TestIsValidFaker: unknown_faker faker check failed")
}
}