forked from vmware-archive/atc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_scan_runner_factory.go
125 lines (111 loc) · 4.06 KB
/
fake_scan_runner_factory.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// This file was generated by counterfeiter
package radarfakes
import (
"sync"
"code.cloudfoundry.org/lager"
"github.com/concourse/atc/radar"
"github.com/tedsuo/ifrit"
)
type FakeScanRunnerFactory struct {
ScanResourceRunnerStub func(lager.Logger, string) ifrit.Runner
scanResourceRunnerMutex sync.RWMutex
scanResourceRunnerArgsForCall []struct {
arg1 lager.Logger
arg2 string
}
scanResourceRunnerReturns struct {
result1 ifrit.Runner
}
ScanResourceTypeRunnerStub func(lager.Logger, string) ifrit.Runner
scanResourceTypeRunnerMutex sync.RWMutex
scanResourceTypeRunnerArgsForCall []struct {
arg1 lager.Logger
arg2 string
}
scanResourceTypeRunnerReturns struct {
result1 ifrit.Runner
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeScanRunnerFactory) ScanResourceRunner(arg1 lager.Logger, arg2 string) ifrit.Runner {
fake.scanResourceRunnerMutex.Lock()
fake.scanResourceRunnerArgsForCall = append(fake.scanResourceRunnerArgsForCall, struct {
arg1 lager.Logger
arg2 string
}{arg1, arg2})
fake.recordInvocation("ScanResourceRunner", []interface{}{arg1, arg2})
fake.scanResourceRunnerMutex.Unlock()
if fake.ScanResourceRunnerStub != nil {
return fake.ScanResourceRunnerStub(arg1, arg2)
} else {
return fake.scanResourceRunnerReturns.result1
}
}
func (fake *FakeScanRunnerFactory) ScanResourceRunnerCallCount() int {
fake.scanResourceRunnerMutex.RLock()
defer fake.scanResourceRunnerMutex.RUnlock()
return len(fake.scanResourceRunnerArgsForCall)
}
func (fake *FakeScanRunnerFactory) ScanResourceRunnerArgsForCall(i int) (lager.Logger, string) {
fake.scanResourceRunnerMutex.RLock()
defer fake.scanResourceRunnerMutex.RUnlock()
return fake.scanResourceRunnerArgsForCall[i].arg1, fake.scanResourceRunnerArgsForCall[i].arg2
}
func (fake *FakeScanRunnerFactory) ScanResourceRunnerReturns(result1 ifrit.Runner) {
fake.ScanResourceRunnerStub = nil
fake.scanResourceRunnerReturns = struct {
result1 ifrit.Runner
}{result1}
}
func (fake *FakeScanRunnerFactory) ScanResourceTypeRunner(arg1 lager.Logger, arg2 string) ifrit.Runner {
fake.scanResourceTypeRunnerMutex.Lock()
fake.scanResourceTypeRunnerArgsForCall = append(fake.scanResourceTypeRunnerArgsForCall, struct {
arg1 lager.Logger
arg2 string
}{arg1, arg2})
fake.recordInvocation("ScanResourceTypeRunner", []interface{}{arg1, arg2})
fake.scanResourceTypeRunnerMutex.Unlock()
if fake.ScanResourceTypeRunnerStub != nil {
return fake.ScanResourceTypeRunnerStub(arg1, arg2)
} else {
return fake.scanResourceTypeRunnerReturns.result1
}
}
func (fake *FakeScanRunnerFactory) ScanResourceTypeRunnerCallCount() int {
fake.scanResourceTypeRunnerMutex.RLock()
defer fake.scanResourceTypeRunnerMutex.RUnlock()
return len(fake.scanResourceTypeRunnerArgsForCall)
}
func (fake *FakeScanRunnerFactory) ScanResourceTypeRunnerArgsForCall(i int) (lager.Logger, string) {
fake.scanResourceTypeRunnerMutex.RLock()
defer fake.scanResourceTypeRunnerMutex.RUnlock()
return fake.scanResourceTypeRunnerArgsForCall[i].arg1, fake.scanResourceTypeRunnerArgsForCall[i].arg2
}
func (fake *FakeScanRunnerFactory) ScanResourceTypeRunnerReturns(result1 ifrit.Runner) {
fake.ScanResourceTypeRunnerStub = nil
fake.scanResourceTypeRunnerReturns = struct {
result1 ifrit.Runner
}{result1}
}
func (fake *FakeScanRunnerFactory) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.scanResourceRunnerMutex.RLock()
defer fake.scanResourceRunnerMutex.RUnlock()
fake.scanResourceTypeRunnerMutex.RLock()
defer fake.scanResourceTypeRunnerMutex.RUnlock()
return fake.invocations
}
func (fake *FakeScanRunnerFactory) recordInvocation(key string, args []interface{}) {
fake.invocationsMutex.Lock()
defer fake.invocationsMutex.Unlock()
if fake.invocations == nil {
fake.invocations = map[string][][]interface{}{}
}
if fake.invocations[key] == nil {
fake.invocations[key] = [][]interface{}{}
}
fake.invocations[key] = append(fake.invocations[key], args)
}
var _ radar.ScanRunnerFactory = new(FakeScanRunnerFactory)