-
Notifications
You must be signed in to change notification settings - Fork 161
/
fake_generator.go
93 lines (81 loc) · 2.32 KB
/
fake_generator.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// This file was generated by counterfeiter
package fakes
import (
"sync"
"github.com/cloudfoundry/bosh-cli/releasedir"
)
type FakeGenerator struct {
GenerateJobStub func(string) error
generateJobMutex sync.RWMutex
generateJobArgsForCall []struct {
arg1 string
}
generateJobReturns struct {
result1 error
}
GeneratePackageStub func(string) error
generatePackageMutex sync.RWMutex
generatePackageArgsForCall []struct {
arg1 string
}
generatePackageReturns struct {
result1 error
}
}
func (fake *FakeGenerator) GenerateJob(arg1 string) error {
fake.generateJobMutex.Lock()
fake.generateJobArgsForCall = append(fake.generateJobArgsForCall, struct {
arg1 string
}{arg1})
fake.generateJobMutex.Unlock()
if fake.GenerateJobStub != nil {
return fake.GenerateJobStub(arg1)
} else {
return fake.generateJobReturns.result1
}
}
func (fake *FakeGenerator) GenerateJobCallCount() int {
fake.generateJobMutex.RLock()
defer fake.generateJobMutex.RUnlock()
return len(fake.generateJobArgsForCall)
}
func (fake *FakeGenerator) GenerateJobArgsForCall(i int) string {
fake.generateJobMutex.RLock()
defer fake.generateJobMutex.RUnlock()
return fake.generateJobArgsForCall[i].arg1
}
func (fake *FakeGenerator) GenerateJobReturns(result1 error) {
fake.GenerateJobStub = nil
fake.generateJobReturns = struct {
result1 error
}{result1}
}
func (fake *FakeGenerator) GeneratePackage(arg1 string) error {
fake.generatePackageMutex.Lock()
fake.generatePackageArgsForCall = append(fake.generatePackageArgsForCall, struct {
arg1 string
}{arg1})
fake.generatePackageMutex.Unlock()
if fake.GeneratePackageStub != nil {
return fake.GeneratePackageStub(arg1)
} else {
return fake.generatePackageReturns.result1
}
}
func (fake *FakeGenerator) GeneratePackageCallCount() int {
fake.generatePackageMutex.RLock()
defer fake.generatePackageMutex.RUnlock()
return len(fake.generatePackageArgsForCall)
}
func (fake *FakeGenerator) GeneratePackageArgsForCall(i int) string {
fake.generatePackageMutex.RLock()
defer fake.generatePackageMutex.RUnlock()
return fake.generatePackageArgsForCall[i].arg1
}
func (fake *FakeGenerator) GeneratePackageReturns(result1 error) {
fake.GeneratePackageStub = nil
fake.generatePackageReturns = struct {
result1 error
}{result1}
}
var _ releasedir.Generator = new(FakeGenerator)