forked from cloudfoundry/bosh-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_adjustment.go
96 lines (84 loc) · 2.46 KB
/
fake_adjustment.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
// This file was generated by counterfeiter
package fakes
import (
"net/http"
"sync"
"github.com/cloudfoundry/bosh-cli/director"
)
type FakeAdjustment struct {
AdjustStub func(req *http.Request, retried bool) error
adjustMutex sync.RWMutex
adjustArgsForCall []struct {
req *http.Request
retried bool
}
adjustReturns struct {
result1 error
}
NeedsReadjustmentStub func(*http.Response) bool
needsReadjustmentMutex sync.RWMutex
needsReadjustmentArgsForCall []struct {
arg1 *http.Response
}
needsReadjustmentReturns struct {
result1 bool
}
}
func (fake *FakeAdjustment) Adjust(req *http.Request, retried bool) error {
fake.adjustMutex.Lock()
fake.adjustArgsForCall = append(fake.adjustArgsForCall, struct {
req *http.Request
retried bool
}{req, retried})
fake.adjustMutex.Unlock()
if fake.AdjustStub != nil {
return fake.AdjustStub(req, retried)
} else {
return fake.adjustReturns.result1
}
}
func (fake *FakeAdjustment) AdjustCallCount() int {
fake.adjustMutex.RLock()
defer fake.adjustMutex.RUnlock()
return len(fake.adjustArgsForCall)
}
func (fake *FakeAdjustment) AdjustArgsForCall(i int) (*http.Request, bool) {
fake.adjustMutex.RLock()
defer fake.adjustMutex.RUnlock()
return fake.adjustArgsForCall[i].req, fake.adjustArgsForCall[i].retried
}
func (fake *FakeAdjustment) AdjustReturns(result1 error) {
fake.AdjustStub = nil
fake.adjustReturns = struct {
result1 error
}{result1}
}
func (fake *FakeAdjustment) NeedsReadjustment(arg1 *http.Response) bool {
fake.needsReadjustmentMutex.Lock()
fake.needsReadjustmentArgsForCall = append(fake.needsReadjustmentArgsForCall, struct {
arg1 *http.Response
}{arg1})
fake.needsReadjustmentMutex.Unlock()
if fake.NeedsReadjustmentStub != nil {
return fake.NeedsReadjustmentStub(arg1)
} else {
return fake.needsReadjustmentReturns.result1
}
}
func (fake *FakeAdjustment) NeedsReadjustmentCallCount() int {
fake.needsReadjustmentMutex.RLock()
defer fake.needsReadjustmentMutex.RUnlock()
return len(fake.needsReadjustmentArgsForCall)
}
func (fake *FakeAdjustment) NeedsReadjustmentArgsForCall(i int) *http.Response {
fake.needsReadjustmentMutex.RLock()
defer fake.needsReadjustmentMutex.RUnlock()
return fake.needsReadjustmentArgsForCall[i].arg1
}
func (fake *FakeAdjustment) NeedsReadjustmentReturns(result1 bool) {
fake.NeedsReadjustmentStub = nil
fake.needsReadjustmentReturns = struct {
result1 bool
}{result1}
}
var _ director.Adjustment = new(FakeAdjustment)