forked from runatlantis/atlantis
/
mock_lock_url_generator.go
68 lines (54 loc) · 2.49 KB
/
mock_lock_url_generator.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
// Automatically generated by pegomock. DO NOT EDIT!
// Source: github.com/runatlantis/atlantis/server/events (interfaces: LockURLGenerator)
package mocks
import (
"reflect"
pegomock "github.com/petergtz/pegomock"
)
type MockLockURLGenerator struct {
fail func(message string, callerSkip ...int)
}
func NewMockLockURLGenerator() *MockLockURLGenerator {
return &MockLockURLGenerator{fail: pegomock.GlobalFailHandler}
}
func (mock *MockLockURLGenerator) SetLockURL(_param0 func(string) string) {
params := []pegomock.Param{_param0}
pegomock.GetGenericMockFrom(mock).Invoke("SetLockURL", params, []reflect.Type{})
}
func (mock *MockLockURLGenerator) VerifyWasCalledOnce() *VerifierLockURLGenerator {
return &VerifierLockURLGenerator{mock, pegomock.Times(1), nil}
}
func (mock *MockLockURLGenerator) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierLockURLGenerator {
return &VerifierLockURLGenerator{mock, invocationCountMatcher, nil}
}
func (mock *MockLockURLGenerator) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, inOrderContext *pegomock.InOrderContext) *VerifierLockURLGenerator {
return &VerifierLockURLGenerator{mock, invocationCountMatcher, inOrderContext}
}
type VerifierLockURLGenerator struct {
mock *MockLockURLGenerator
invocationCountMatcher pegomock.Matcher
inOrderContext *pegomock.InOrderContext
}
func (verifier *VerifierLockURLGenerator) SetLockURL(_param0 func(string) string) *LockURLGenerator_SetLockURL_OngoingVerification {
params := []pegomock.Param{_param0}
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "SetLockURL", params)
return &LockURLGenerator_SetLockURL_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
}
type LockURLGenerator_SetLockURL_OngoingVerification struct {
mock *MockLockURLGenerator
methodInvocations []pegomock.MethodInvocation
}
func (c *LockURLGenerator_SetLockURL_OngoingVerification) GetCapturedArguments() func(string) string {
_param0 := c.GetAllCapturedArguments()
return _param0[len(_param0)-1]
}
func (c *LockURLGenerator_SetLockURL_OngoingVerification) GetAllCapturedArguments() (_param0 []func(string) string) {
params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
if len(params) > 0 {
_param0 = make([]func(string) string, len(params[0]))
for u, param := range params[0] {
_param0[u] = param.(func(string) string)
}
}
return
}