// Code generated by pegomock. DO NOT EDIT. // Source: github.com/runatlantis/atlantis/server/core/runtime (interfaces: Runner) package mocks import ( pegomock "github.com/petergtz/pegomock" command "github.com/runatlantis/atlantis/server/events/command" "reflect" "time" ) type MockRunner struct { fail func(message string, callerSkip ...int) } func NewMockRunner(options ...pegomock.Option) *MockRunner { mock := &MockRunner{} for _, option := range options { option.Apply(mock) } return mock } func (mock *MockRunner) SetFailHandler(fh pegomock.FailHandler) { mock.fail = fh } func (mock *MockRunner) FailHandler() pegomock.FailHandler { return mock.fail } func (mock *MockRunner) Run(_param0 command.ProjectContext, _param1 []string, _param2 string, _param3 map[string]string) (string, error) { if mock == nil { panic("mock must not be nil. Use myMock := NewMockRunner().") } params := []pegomock.Param{_param0, _param1, _param2, _param3} result := pegomock.GetGenericMockFrom(mock).Invoke("Run", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()}) var ret0 string var ret1 error if len(result) != 0 { if result[0] != nil { ret0 = result[0].(string) } if result[1] != nil { ret1 = result[1].(error) } } return ret0, ret1 } func (mock *MockRunner) VerifyWasCalledOnce() *VerifierMockRunner { return &VerifierMockRunner{ mock: mock, invocationCountMatcher: pegomock.Times(1), } } func (mock *MockRunner) VerifyWasCalled(invocationCountMatcher pegomock.InvocationCountMatcher) *VerifierMockRunner { return &VerifierMockRunner{ mock: mock, invocationCountMatcher: invocationCountMatcher, } } func (mock *MockRunner) VerifyWasCalledInOrder(invocationCountMatcher pegomock.InvocationCountMatcher, inOrderContext *pegomock.InOrderContext) *VerifierMockRunner { return &VerifierMockRunner{ mock: mock, invocationCountMatcher: invocationCountMatcher, inOrderContext: inOrderContext, } } func (mock *MockRunner) VerifyWasCalledEventually(invocationCountMatcher pegomock.InvocationCountMatcher, timeout time.Duration) *VerifierMockRunner { return &VerifierMockRunner{ mock: mock, invocationCountMatcher: invocationCountMatcher, timeout: timeout, } } type VerifierMockRunner struct { mock *MockRunner invocationCountMatcher pegomock.InvocationCountMatcher inOrderContext *pegomock.InOrderContext timeout time.Duration } func (verifier *VerifierMockRunner) Run(_param0 command.ProjectContext, _param1 []string, _param2 string, _param3 map[string]string) *MockRunner_Run_OngoingVerification { params := []pegomock.Param{_param0, _param1, _param2, _param3} methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "Run", params, verifier.timeout) return &MockRunner_Run_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations} } type MockRunner_Run_OngoingVerification struct { mock *MockRunner methodInvocations []pegomock.MethodInvocation } func (c *MockRunner_Run_OngoingVerification) GetCapturedArguments() (command.ProjectContext, []string, string, map[string]string) { _param0, _param1, _param2, _param3 := c.GetAllCapturedArguments() return _param0[len(_param0)-1], _param1[len(_param1)-1], _param2[len(_param2)-1], _param3[len(_param3)-1] } func (c *MockRunner_Run_OngoingVerification) GetAllCapturedArguments() (_param0 []command.ProjectContext, _param1 [][]string, _param2 []string, _param3 []map[string]string) { params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations) if len(params) > 0 { _param0 = make([]command.ProjectContext, len(c.methodInvocations)) for u, param := range params[0] { _param0[u] = param.(command.ProjectContext) } _param1 = make([][]string, len(c.methodInvocations)) for u, param := range params[1] { _param1[u] = param.([]string) } _param2 = make([]string, len(c.methodInvocations)) for u, param := range params[2] { _param2[u] = param.(string) } _param3 = make([]map[string]string, len(c.methodInvocations)) for u, param := range params[3] { _param3[u] = param.(map[string]string) } } return }