forked from jenkins-x/jx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
organisation_lister.go
72 lines (59 loc) · 2.62 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
// 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"
)
type MockOrganisationLister struct {
fail func(message string, callerSkip ...int)
}
func NewMockOrganisationLister() *MockOrganisationLister {
return &MockOrganisationLister{fail: pegomock.GlobalFailHandler}
}
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() *VerifierOrganisationLister {
return &VerifierOrganisationLister{mock, pegomock.Times(1), nil}
}
func (mock *MockOrganisationLister) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierOrganisationLister {
return &VerifierOrganisationLister{mock, invocationCountMatcher, nil}
}
func (mock *MockOrganisationLister) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, inOrderContext *pegomock.InOrderContext) *VerifierOrganisationLister {
return &VerifierOrganisationLister{mock, invocationCountMatcher, inOrderContext}
}
type VerifierOrganisationLister struct {
mock *MockOrganisationLister
invocationCountMatcher pegomock.Matcher
inOrderContext *pegomock.InOrderContext
}
func (verifier *VerifierOrganisationLister) ListOrganisations() *OrganisationLister_ListOrganisations_OngoingVerification {
params := []pegomock.Param{}
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ListOrganisations", params)
return &OrganisationLister_ListOrganisations_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
}
type OrganisationLister_ListOrganisations_OngoingVerification struct {
mock *MockOrganisationLister
methodInvocations []pegomock.MethodInvocation
}
func (c *OrganisationLister_ListOrganisations_OngoingVerification) GetCapturedArguments() {
}
func (c *OrganisationLister_ListOrganisations_OngoingVerification) GetAllCapturedArguments() {
}