-
Notifications
You must be signed in to change notification settings - Fork 785
/
organisation_lister.go
99 lines (84 loc) · 3.48 KB
/
organisation_lister.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
// Code generated by pegomock. DO NOT EDIT.
// Source: github.com/jenkins-x/jx/pkg/gits (interfaces: OrganisationLister)
package gits_test
import (
gits "github.com/jenkins-x/jx/pkg/gits"
pegomock "github.com/petergtz/pegomock"
"reflect"
"time"
)
type MockOrganisationLister struct {
fail func(message string, callerSkip ...int)
}
func NewMockOrganisationLister(options ...pegomock.Option) *MockOrganisationLister {
mock := &MockOrganisationLister{}
for _, option := range options {
option.Apply(mock)
}
return mock
}
func (mock *MockOrganisationLister) SetFailHandler(fh pegomock.FailHandler) { mock.fail = fh }
func (mock *MockOrganisationLister) FailHandler() pegomock.FailHandler { return mock.fail }
func (mock *MockOrganisationLister) ListOrganisations() ([]gits.GitOrganisation, error) {
if mock == nil {
panic("mock must not be nil. Use myMock := NewMockOrganisationLister().")
}
params := []pegomock.Param{}
result := pegomock.GetGenericMockFrom(mock).Invoke("ListOrganisations", params, []reflect.Type{reflect.TypeOf((*[]gits.GitOrganisation)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
var ret0 []gits.GitOrganisation
var ret1 error
if len(result) != 0 {
if result[0] != nil {
ret0 = result[0].([]gits.GitOrganisation)
}
if result[1] != nil {
ret1 = result[1].(error)
}
}
return ret0, ret1
}
func (mock *MockOrganisationLister) VerifyWasCalledOnce() *VerifierMockOrganisationLister {
return &VerifierMockOrganisationLister{
mock: mock,
invocationCountMatcher: pegomock.Times(1),
}
}
func (mock *MockOrganisationLister) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierMockOrganisationLister {
return &VerifierMockOrganisationLister{
mock: mock,
invocationCountMatcher: invocationCountMatcher,
}
}
func (mock *MockOrganisationLister) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, inOrderContext *pegomock.InOrderContext) *VerifierMockOrganisationLister {
return &VerifierMockOrganisationLister{
mock: mock,
invocationCountMatcher: invocationCountMatcher,
inOrderContext: inOrderContext,
}
}
func (mock *MockOrganisationLister) VerifyWasCalledEventually(invocationCountMatcher pegomock.Matcher, timeout time.Duration) *VerifierMockOrganisationLister {
return &VerifierMockOrganisationLister{
mock: mock,
invocationCountMatcher: invocationCountMatcher,
timeout: timeout,
}
}
type VerifierMockOrganisationLister struct {
mock *MockOrganisationLister
invocationCountMatcher pegomock.Matcher
inOrderContext *pegomock.InOrderContext
timeout time.Duration
}
func (verifier *VerifierMockOrganisationLister) ListOrganisations() *MockOrganisationLister_ListOrganisations_OngoingVerification {
params := []pegomock.Param{}
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ListOrganisations", params, verifier.timeout)
return &MockOrganisationLister_ListOrganisations_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
}
type MockOrganisationLister_ListOrganisations_OngoingVerification struct {
mock *MockOrganisationLister
methodInvocations []pegomock.MethodInvocation
}
func (c *MockOrganisationLister_ListOrganisations_OngoingVerification) GetCapturedArguments() {
}
func (c *MockOrganisationLister_ListOrganisations_OngoingVerification) GetAllCapturedArguments() {
}