forked from deblan/database-anonymizer
add tests
This commit is contained in:
parent
f4946b3c08
commit
2db8cc1087
1 changed files with 25 additions and 0 deletions
25
faker/faker_test.go
Normal file
25
faker/faker_test.go
Normal 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")
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue