// Code generated by pegomock. DO NOT EDIT.
// Source: github.com/runatlantis/atlantis/server/events (interfaces: ApplyRequirement)

package mocks

import (
	"reflect"
	"time"

	pegomock "github.com/petergtz/pegomock"
	"github.com/runatlantis/atlantis/server/events/command"
)

type MockApplyRequirement struct {
	fail func(message string, callerSkip ...int)
}

func NewMockApplyRequirement(options ...pegomock.Option) *MockApplyRequirement {
	mock := &MockApplyRequirement{}
	for _, option := range options {
		option.Apply(mock)
	}
	return mock
}

func (mock *MockApplyRequirement) SetFailHandler(fh pegomock.FailHandler) { mock.fail = fh }
func (mock *MockApplyRequirement) FailHandler() pegomock.FailHandler      { return mock.fail }

func (mock *MockApplyRequirement) ValidateProject(_param0 string, _param1 command.ProjectContext) (string, error) {
	if mock == nil {
		panic("mock must not be nil. Use myMock := NewMockApplyRequirement().")
	}
	params := []pegomock.Param{_param0, _param1}
	result := pegomock.GetGenericMockFrom(mock).Invoke("ValidateProject", 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 *MockApplyRequirement) VerifyWasCalledOnce() *VerifierMockApplyRequirement {
	return &VerifierMockApplyRequirement{
		mock:                   mock,
		invocationCountMatcher: pegomock.Times(1),
	}
}

func (mock *MockApplyRequirement) VerifyWasCalled(invocationCountMatcher pegomock.InvocationCountMatcher) *VerifierMockApplyRequirement {
	return &VerifierMockApplyRequirement{
		mock:                   mock,
		invocationCountMatcher: invocationCountMatcher,
	}
}

func (mock *MockApplyRequirement) VerifyWasCalledInOrder(invocationCountMatcher pegomock.InvocationCountMatcher, inOrderContext *pegomock.InOrderContext) *VerifierMockApplyRequirement {
	return &VerifierMockApplyRequirement{
		mock:                   mock,
		invocationCountMatcher: invocationCountMatcher,
		inOrderContext:         inOrderContext,
	}
}

func (mock *MockApplyRequirement) VerifyWasCalledEventually(invocationCountMatcher pegomock.InvocationCountMatcher, timeout time.Duration) *VerifierMockApplyRequirement {
	return &VerifierMockApplyRequirement{
		mock:                   mock,
		invocationCountMatcher: invocationCountMatcher,
		timeout:                timeout,
	}
}

type VerifierMockApplyRequirement struct {
	mock                   *MockApplyRequirement
	invocationCountMatcher pegomock.InvocationCountMatcher
	inOrderContext         *pegomock.InOrderContext
	timeout                time.Duration
}

func (verifier *VerifierMockApplyRequirement) ValidateProject(_param0 string, _param1 command.ProjectContext) *MockApplyRequirement_ValidateProject_OngoingVerification {
	params := []pegomock.Param{_param0, _param1}
	methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ValidateProject", params, verifier.timeout)
	return &MockApplyRequirement_ValidateProject_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
}

type MockApplyRequirement_ValidateProject_OngoingVerification struct {
	mock              *MockApplyRequirement
	methodInvocations []pegomock.MethodInvocation
}

func (c *MockApplyRequirement_ValidateProject_OngoingVerification) GetCapturedArguments() (string, command.ProjectContext) {
	_param0, _param1 := c.GetAllCapturedArguments()
	return _param0[len(_param0)-1], _param1[len(_param1)-1]
}

func (c *MockApplyRequirement_ValidateProject_OngoingVerification) GetAllCapturedArguments() (_param0 []string, _param1 []command.ProjectContext) {
	params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
	if len(params) > 0 {
		_param0 = make([]string, len(c.methodInvocations))
		for u, param := range params[0] {
			_param0[u] = param.(string)
		}
		_param1 = make([]command.ProjectContext, len(c.methodInvocations))
		for u, param := range params[1] {
			_param1[u] = param.(command.ProjectContext)
		}
	}
	return
}
