forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_simple_progress_bar.go
150 lines (135 loc) · 4.15 KB
/
fake_simple_progress_bar.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Code generated by counterfeiter. DO NOT EDIT.
package v2actionfakes
import (
"io"
"sync"
"code.cloudfoundry.org/cli/actor/v2action"
)
type FakeSimpleProgressBar struct {
InitializeStub func(string) (io.Reader, int64, error)
initializeMutex sync.RWMutex
initializeArgsForCall []struct {
arg1 string
}
initializeReturns struct {
result1 io.Reader
result2 int64
result3 error
}
initializeReturnsOnCall map[int]struct {
result1 io.Reader
result2 int64
result3 error
}
TerminateStub func()
terminateMutex sync.RWMutex
terminateArgsForCall []struct {
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *FakeSimpleProgressBar) Initialize(arg1 string) (io.Reader, int64, error) {
fake.initializeMutex.Lock()
ret, specificReturn := fake.initializeReturnsOnCall[len(fake.initializeArgsForCall)]
fake.initializeArgsForCall = append(fake.initializeArgsForCall, struct {
arg1 string
}{arg1})
fake.recordInvocation("Initialize", []interface{}{arg1})
fake.initializeMutex.Unlock()
if fake.InitializeStub != nil {
return fake.InitializeStub(arg1)
}
if specificReturn {
return ret.result1, ret.result2, ret.result3
}
fakeReturns := fake.initializeReturns
return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3
}
func (fake *FakeSimpleProgressBar) InitializeCallCount() int {
fake.initializeMutex.RLock()
defer fake.initializeMutex.RUnlock()
return len(fake.initializeArgsForCall)
}
func (fake *FakeSimpleProgressBar) InitializeCalls(stub func(string) (io.Reader, int64, error)) {
fake.initializeMutex.Lock()
defer fake.initializeMutex.Unlock()
fake.InitializeStub = stub
}
func (fake *FakeSimpleProgressBar) InitializeArgsForCall(i int) string {
fake.initializeMutex.RLock()
defer fake.initializeMutex.RUnlock()
argsForCall := fake.initializeArgsForCall[i]
return argsForCall.arg1
}
func (fake *FakeSimpleProgressBar) InitializeReturns(result1 io.Reader, result2 int64, result3 error) {
fake.initializeMutex.Lock()
defer fake.initializeMutex.Unlock()
fake.InitializeStub = nil
fake.initializeReturns = struct {
result1 io.Reader
result2 int64
result3 error
}{result1, result2, result3}
}
func (fake *FakeSimpleProgressBar) InitializeReturnsOnCall(i int, result1 io.Reader, result2 int64, result3 error) {
fake.initializeMutex.Lock()
defer fake.initializeMutex.Unlock()
fake.InitializeStub = nil
if fake.initializeReturnsOnCall == nil {
fake.initializeReturnsOnCall = make(map[int]struct {
result1 io.Reader
result2 int64
result3 error
})
}
fake.initializeReturnsOnCall[i] = struct {
result1 io.Reader
result2 int64
result3 error
}{result1, result2, result3}
}
func (fake *FakeSimpleProgressBar) Terminate() {
fake.terminateMutex.Lock()
fake.terminateArgsForCall = append(fake.terminateArgsForCall, struct {
}{})
fake.recordInvocation("Terminate", []interface{}{})
fake.terminateMutex.Unlock()
if fake.TerminateStub != nil {
fake.TerminateStub()
}
}
func (fake *FakeSimpleProgressBar) TerminateCallCount() int {
fake.terminateMutex.RLock()
defer fake.terminateMutex.RUnlock()
return len(fake.terminateArgsForCall)
}
func (fake *FakeSimpleProgressBar) TerminateCalls(stub func()) {
fake.terminateMutex.Lock()
defer fake.terminateMutex.Unlock()
fake.TerminateStub = stub
}
func (fake *FakeSimpleProgressBar) Invocations() map[string][][]interface{} {
fake.invocationsMutex.RLock()
defer fake.invocationsMutex.RUnlock()
fake.initializeMutex.RLock()
defer fake.initializeMutex.RUnlock()
fake.terminateMutex.RLock()
defer fake.terminateMutex.RUnlock()
copiedInvocations := map[string][][]interface{}{}
for key, value := range fake.invocations {
copiedInvocations[key] = value
}
return copiedInvocations
}
func (fake *FakeSimpleProgressBar) 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 _ v2action.SimpleProgressBar = new(FakeSimpleProgressBar)