MCPcopy Create free account
hub / github.com/Pallinder/go-randomdata / TestFirstName

Function TestFirstName

random_data_test.go:75–93  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func TestFirstName(t *testing.T) {
76 t.Log("TestFirstName")
77 firstNameMale := FirstName(Male)
78 firstNameFemale := FirstName(Female)
79 randomName := FirstName(RandomGender)
80
81 if !findInSlice(jsonData.FirstNamesMale, firstNameMale) {
82 t.Error("firstNameMale empty or not in male names")
83 }
84
85 if !findInSlice(jsonData.FirstNamesFemale, firstNameFemale) {
86 t.Error("firstNameFemale empty or not in female names")
87 }
88
89 if randomName == "" {
90 t.Error("randomName empty")
91 }
92
93}
94
95func TestLastName(t *testing.T) {
96 t.Log("TestLastName")

Callers

nothing calls this directly

Calls 2

FirstNameFunction · 0.85
findInSliceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…