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

package mocks

import (
	pegomock "github.com/petergtz/pegomock/v4"
	jobs "github.com/runatlantis/atlantis/server/jobs"
	"reflect"
	"time"
)

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

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

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

func (mock *MockResourceCleaner) CleanUp(pullInfo jobs.PullInfo) {
	if mock == nil {
		panic("mock must not be nil. Use myMock := NewMockResourceCleaner().")
	}
	_params := []pegomock.Param{pullInfo}
	pegomock.GetGenericMockFrom(mock).Invoke("CleanUp", _params, []reflect.Type{})
}

func (mock *MockResourceCleaner) VerifyWasCalledOnce() *VerifierMockResourceCleaner {
	return &VerifierMockResourceCleaner{
		mock:                   mock,
		invocationCountMatcher: pegomock.Times(1),
	}
}

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

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

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

type VerifierMockResourceCleaner struct {
	mock                   *MockResourceCleaner
	invocationCountMatcher pegomock.InvocationCountMatcher
	inOrderContext         *pegomock.InOrderContext
	timeout                time.Duration
}

func (verifier *VerifierMockResourceCleaner) CleanUp(pullInfo jobs.PullInfo) *MockResourceCleaner_CleanUp_OngoingVerification {
	_params := []pegomock.Param{pullInfo}
	methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CleanUp", _params, verifier.timeout)
	return &MockResourceCleaner_CleanUp_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
}

type MockResourceCleaner_CleanUp_OngoingVerification struct {
	mock              *MockResourceCleaner
	methodInvocations []pegomock.MethodInvocation
}

func (c *MockResourceCleaner_CleanUp_OngoingVerification) GetCapturedArguments() jobs.PullInfo {
	pullInfo := c.GetAllCapturedArguments()
	return pullInfo[len(pullInfo)-1]
}

func (c *MockResourceCleaner_CleanUp_OngoingVerification) GetAllCapturedArguments() (_param0 []jobs.PullInfo) {
	_params := pegomock.GetGenericMockFrom(c.mock).GetInvocationParams(c.methodInvocations)
	if len(_params) > 0 {
		if len(_params) > 0 {
			_param0 = make([]jobs.PullInfo, len(c.methodInvocations))
			for u, param := range _params[0] {
				_param0[u] = param.(jobs.PullInfo)
			}
		}
	}
	return
}
