-
-
Notifications
You must be signed in to change notification settings - Fork 59
/
company_test.go
58 lines (49 loc) · 1.05 KB
/
company_test.go
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package faker
import (
"strings"
"testing"
)
func TestCompanyCatchPhrase(t *testing.T) {
f := New().Company()
phrase := f.CatchPhrase()
Expect(t, true, len(phrase) > 0)
Expect(t, 2, strings.Count(phrase, " ")) // 3 words
}
func BenchmarkCompanyCatchPhrase(b *testing.B) {
f := New().Company()
for i := 0; i < b.N; i++ {
_ = f.CatchPhrase()
}
}
func TestCompanyBS(t *testing.T) {
f := New().Company()
bs := f.BS()
Expect(t, true, len(bs) > 0)
Expect(t, 2, strings.Count(bs, " ")) // 3 words
}
func BenchmarkCompanyBS(b *testing.B) {
f := New().Company()
for i := 0; i < b.N; i++ {
_ = f.BS()
}
}
func TestCompanySuffix(t *testing.T) {
f := New().Company()
value := f.Suffix()
Expect(t, true, len(value) > 0)
}
func TestCompanyName(t *testing.T) {
f := New().Company()
value := f.Name()
Expect(t, true, len(value) > 0)
}
func TestCompanyJobTitle(t *testing.T) {
f := New().Company()
value := f.JobTitle()
Expect(t, true, len(value) > 0)
}
func TestEIN(t *testing.T) {
f := New().Company()
value := f.EIN()
Expect(t, true, value > 0)
}