// 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"
	metricstypes "github.com/keptn/lifecycle-toolkit/metrics-operator/controllers/common/analysis/types"
	"sync"
)

// IObjectivesEvaluatorMock is a mock implementation of analysis.IObjectivesEvaluator.
//
//	func TestSomethingThatUsesIObjectivesEvaluator(t *testing.T) {
//
//		// make and configure a mocked analysis.IObjectivesEvaluator
//		mockedIObjectivesEvaluator := &IObjectivesEvaluatorMock{
//			EvaluateFunc: func(ctx context.Context, metricsProvider *metricsapi.KeptnMetricsProvider, obj chan metricstypes.ProviderRequest)  {
//				panic("mock out the Evaluate method")
//			},
//		}
//
//		// use mockedIObjectivesEvaluator in code that requires analysis.IObjectivesEvaluator
//		// and then make assertions.
//
//	}
type IObjectivesEvaluatorMock struct {
	// EvaluateFunc mocks the Evaluate method.
	EvaluateFunc func(ctx context.Context, metricsProvider *metricsapi.KeptnMetricsProvider, obj chan metricstypes.ProviderRequest)

	// calls tracks calls to the methods.
	calls struct {
		// Evaluate holds details about calls to the Evaluate method.
		Evaluate []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// ProviderType is the providerType argument value.
			metricsProvider *metricsapi.KeptnMetricsProvider
			// Obj is the obj argument value.
			Obj chan metricstypes.ProviderRequest
		}
	}
	lockEvaluate sync.RWMutex
}

// Evaluate calls EvaluateFunc.
func (mock *IObjectivesEvaluatorMock) Evaluate(ctx context.Context, metricsProvider *metricsapi.KeptnMetricsProvider, obj chan metricstypes.ProviderRequest) {
	if mock.EvaluateFunc == nil {
		panic("IObjectivesEvaluatorMock.EvaluateFunc: method is nil but IObjectivesEvaluator.Evaluate was just called")
	}
	callInfo := struct {
		Ctx             context.Context
		metricsProvider *metricsapi.KeptnMetricsProvider
		Obj             chan metricstypes.ProviderRequest
	}{
		Ctx:             ctx,
		metricsProvider: metricsProvider,
		Obj:             obj,
	}
	mock.lockEvaluate.Lock()
	mock.calls.Evaluate = append(mock.calls.Evaluate, callInfo)
	mock.lockEvaluate.Unlock()
	mock.EvaluateFunc(ctx, metricsProvider, obj)
}

// EvaluateCalls gets all the calls that were made to Evaluate.
// Check the length with:
//
//	len(mockedIObjectivesEvaluator.EvaluateCalls())
func (mock *IObjectivesEvaluatorMock) EvaluateCalls() []struct {
	Ctx             context.Context
	metricsProvider *metricsapi.KeptnMetricsProvider
	Obj             chan metricstypes.ProviderRequest
} {
	var calls []struct {
		Ctx             context.Context
		metricsProvider *metricsapi.KeptnMetricsProvider
		Obj             chan metricstypes.ProviderRequest
	}
	mock.lockEvaluate.RLock()
	calls = mock.calls.Evaluate
	mock.lockEvaluate.RUnlock()
	return calls
}
