-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfake_events_endpoint_strategy.go
86 lines (75 loc) · 2.42 KB
/
fake_events_endpoint_strategy.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
// This file was generated by counterfeiter
package strategyfakes
import (
"sync"
"github.com/cloudfoundry/cli/cf/api/resources"
"github.com/cloudfoundry/cli/cf/api/strategy"
)
type FakeEventsEndpointStrategy struct {
EventsURLStub func(appGUID string, limit int64) string
eventsURLMutex sync.RWMutex
eventsURLArgsForCall []struct {
appGUID string
limit int64
}
eventsURLReturns struct {
result1 string
}
EventsResourceStub func() resources.EventResource
eventsResourceMutex sync.RWMutex
eventsResourceArgsForCall []struct{}
eventsResourceReturns struct {
result1 resources.EventResource
}
}
func (fake *FakeEventsEndpointStrategy) EventsURL(appGUID string, limit int64) string {
fake.eventsURLMutex.Lock()
fake.eventsURLArgsForCall = append(fake.eventsURLArgsForCall, struct {
appGUID string
limit int64
}{appGUID, limit})
fake.eventsURLMutex.Unlock()
if fake.EventsURLStub != nil {
return fake.EventsURLStub(appGUID, limit)
} else {
return fake.eventsURLReturns.result1
}
}
func (fake *FakeEventsEndpointStrategy) EventsURLCallCount() int {
fake.eventsURLMutex.RLock()
defer fake.eventsURLMutex.RUnlock()
return len(fake.eventsURLArgsForCall)
}
func (fake *FakeEventsEndpointStrategy) EventsURLArgsForCall(i int) (string, int64) {
fake.eventsURLMutex.RLock()
defer fake.eventsURLMutex.RUnlock()
return fake.eventsURLArgsForCall[i].appGUID, fake.eventsURLArgsForCall[i].limit
}
func (fake *FakeEventsEndpointStrategy) EventsURLReturns(result1 string) {
fake.EventsURLStub = nil
fake.eventsURLReturns = struct {
result1 string
}{result1}
}
func (fake *FakeEventsEndpointStrategy) EventsResource() resources.EventResource {
fake.eventsResourceMutex.Lock()
fake.eventsResourceArgsForCall = append(fake.eventsResourceArgsForCall, struct{}{})
fake.eventsResourceMutex.Unlock()
if fake.EventsResourceStub != nil {
return fake.EventsResourceStub()
} else {
return fake.eventsResourceReturns.result1
}
}
func (fake *FakeEventsEndpointStrategy) EventsResourceCallCount() int {
fake.eventsResourceMutex.RLock()
defer fake.eventsResourceMutex.RUnlock()
return len(fake.eventsResourceArgsForCall)
}
func (fake *FakeEventsEndpointStrategy) EventsResourceReturns(result1 resources.EventResource) {
fake.EventsResourceStub = nil
fake.eventsResourceReturns = struct {
result1 resources.EventResource
}{result1}
}
var _ strategy.EventsEndpointStrategy = new(FakeEventsEndpointStrategy)