-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfake_app_summary_repository.go
88 lines (77 loc) · 2.83 KB
/
fake_app_summary_repository.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
// This file was generated by counterfeiter
package apifakes
import (
"sync"
"github.com/cloudfoundry/cli/cf/api"
"github.com/cloudfoundry/cli/cf/models"
)
type FakeAppSummaryRepository struct {
GetSummariesInCurrentSpaceStub func() (apps []models.Application, apiErr error)
getSummariesInCurrentSpaceMutex sync.RWMutex
getSummariesInCurrentSpaceArgsForCall []struct{}
getSummariesInCurrentSpaceReturns struct {
result1 []models.Application
result2 error
}
GetSummaryStub func(appGUID string) (summary models.Application, apiErr error)
getSummaryMutex sync.RWMutex
getSummaryArgsForCall []struct {
appGUID string
}
getSummaryReturns struct {
result1 models.Application
result2 error
}
}
func (fake *FakeAppSummaryRepository) GetSummariesInCurrentSpace() (apps []models.Application, apiErr error) {
fake.getSummariesInCurrentSpaceMutex.Lock()
fake.getSummariesInCurrentSpaceArgsForCall = append(fake.getSummariesInCurrentSpaceArgsForCall, struct{}{})
fake.getSummariesInCurrentSpaceMutex.Unlock()
if fake.GetSummariesInCurrentSpaceStub != nil {
return fake.GetSummariesInCurrentSpaceStub()
} else {
return fake.getSummariesInCurrentSpaceReturns.result1, fake.getSummariesInCurrentSpaceReturns.result2
}
}
func (fake *FakeAppSummaryRepository) GetSummariesInCurrentSpaceCallCount() int {
fake.getSummariesInCurrentSpaceMutex.RLock()
defer fake.getSummariesInCurrentSpaceMutex.RUnlock()
return len(fake.getSummariesInCurrentSpaceArgsForCall)
}
func (fake *FakeAppSummaryRepository) GetSummariesInCurrentSpaceReturns(result1 []models.Application, result2 error) {
fake.GetSummariesInCurrentSpaceStub = nil
fake.getSummariesInCurrentSpaceReturns = struct {
result1 []models.Application
result2 error
}{result1, result2}
}
func (fake *FakeAppSummaryRepository) GetSummary(appGUID string) (summary models.Application, apiErr error) {
fake.getSummaryMutex.Lock()
fake.getSummaryArgsForCall = append(fake.getSummaryArgsForCall, struct {
appGUID string
}{appGUID})
fake.getSummaryMutex.Unlock()
if fake.GetSummaryStub != nil {
return fake.GetSummaryStub(appGUID)
} else {
return fake.getSummaryReturns.result1, fake.getSummaryReturns.result2
}
}
func (fake *FakeAppSummaryRepository) GetSummaryCallCount() int {
fake.getSummaryMutex.RLock()
defer fake.getSummaryMutex.RUnlock()
return len(fake.getSummaryArgsForCall)
}
func (fake *FakeAppSummaryRepository) GetSummaryArgsForCall(i int) string {
fake.getSummaryMutex.RLock()
defer fake.getSummaryMutex.RUnlock()
return fake.getSummaryArgsForCall[i].appGUID
}
func (fake *FakeAppSummaryRepository) GetSummaryReturns(result1 models.Application, result2 error) {
fake.GetSummaryStub = nil
fake.getSummaryReturns = struct {
result1 models.Application
result2 error
}{result1, result2}
}
var _ api.AppSummaryRepository = new(FakeAppSummaryRepository)