// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq

package fake

import (
	"context"
	metricsapi "github.com/keptn/lifecycle-toolkit/metrics-operator/api/v1"
	"sync"
)

// IAnalysisPoolMock is a mock implementation of analysis.IAnalysisPool.
//
//	func TestSomethingThatUsesIAnalysisPool(t *testing.T) {
//
//		// make and configure a mocked analysis.IAnalysisPool
//		mockedIAnalysisPool := &IAnalysisPoolMock{
//			DispatchAndCollectFunc: func(ctx context.Context) (map[string]metricsapi.ProviderResult, error) {
//				panic("mock out the DispatchAndCollect method")
//			},
//		}
//
//		// use mockedIAnalysisPool in code that requires analysis.IAnalysisPool
//		// and then make assertions.
//
//	}
type IAnalysisPoolMock struct {
	// DispatchAndCollectFunc mocks the DispatchAndCollect method.
	DispatchAndCollectFunc func(ctx context.Context) (map[string]metricsapi.ProviderResult, error)

	// calls tracks calls to the methods.
	calls struct {
		// DispatchAndCollect holds details about calls to the DispatchAndCollect method.
		DispatchAndCollect []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
		}
	}
	lockDispatchAndCollect sync.RWMutex
}

// DispatchAndCollect calls DispatchAndCollectFunc.
func (mock *IAnalysisPoolMock) DispatchAndCollect(ctx context.Context) (map[string]metricsapi.ProviderResult, error) {
	if mock.DispatchAndCollectFunc == nil {
		panic("IAnalysisPoolMock.DispatchAndCollectFunc: method is nil but IAnalysisPool.DispatchAndCollect was just called")
	}
	callInfo := struct {
		Ctx context.Context
	}{
		Ctx: ctx,
	}
	mock.lockDispatchAndCollect.Lock()
	mock.calls.DispatchAndCollect = append(mock.calls.DispatchAndCollect, callInfo)
	mock.lockDispatchAndCollect.Unlock()
	return mock.DispatchAndCollectFunc(ctx)
}

// DispatchAndCollectCalls gets all the calls that were made to DispatchAndCollect.
// Check the length with:
//
//	len(mockedIAnalysisPool.DispatchAndCollectCalls())
func (mock *IAnalysisPoolMock) DispatchAndCollectCalls() []struct {
	Ctx context.Context
} {
	var calls []struct {
		Ctx context.Context
	}
	mock.lockDispatchAndCollect.RLock()
	calls = mock.calls.DispatchAndCollect
	mock.lockDispatchAndCollect.RUnlock()
	return calls
}
