// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"context"

	"github.com/agntcy/identity-service/internal/core/app/types"
	types0 "github.com/agntcy/identity-service/internal/core/policy/types"
	mock "github.com/stretchr/testify/mock"
)

// NewEvaluator creates a new instance of Evaluator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewEvaluator(t interface {
	mock.TestingT
	Cleanup(func())
}) *Evaluator {
	mock := &Evaluator{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}

// Evaluator is an autogenerated mock type for the Evaluator type
type Evaluator struct {
	mock.Mock
}

type Evaluator_Expecter struct {
	mock *mock.Mock
}

func (_m *Evaluator) EXPECT() *Evaluator_Expecter {
	return &Evaluator_Expecter{mock: &_m.Mock}
}

// Evaluate provides a mock function for the type Evaluator
func (_mock *Evaluator) Evaluate(ctx context.Context, calledApp *types.App, callingAppID string, toolName string) (*types0.Rule, error) {
	ret := _mock.Called(ctx, calledApp, callingAppID, toolName)

	if len(ret) == 0 {
		panic("no return value specified for Evaluate")
	}

	var r0 *types0.Rule
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *types.App, string, string) (*types0.Rule, error)); ok {
		return returnFunc(ctx, calledApp, callingAppID, toolName)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *types.App, string, string) *types0.Rule); ok {
		r0 = returnFunc(ctx, calledApp, callingAppID, toolName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*types0.Rule)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *types.App, string, string) error); ok {
		r1 = returnFunc(ctx, calledApp, callingAppID, toolName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

// Evaluator_Evaluate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Evaluate'
type Evaluator_Evaluate_Call struct {
	*mock.Call
}

// Evaluate is a helper method to define mock.On call
//   - ctx context.Context
//   - calledApp *types.App
//   - callingAppID string
//   - toolName string
func (_e *Evaluator_Expecter) Evaluate(ctx interface{}, calledApp interface{}, callingAppID interface{}, toolName interface{}) *Evaluator_Evaluate_Call {
	return &Evaluator_Evaluate_Call{Call: _e.mock.On("Evaluate", ctx, calledApp, callingAppID, toolName)}
}

func (_c *Evaluator_Evaluate_Call) Run(run func(ctx context.Context, calledApp *types.App, callingAppID string, toolName string)) *Evaluator_Evaluate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *types.App
		if args[1] != nil {
			arg1 = args[1].(*types.App)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		var arg3 string
		if args[3] != nil {
			arg3 = args[3].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *Evaluator_Evaluate_Call) Return(rule *types0.Rule, err error) *Evaluator_Evaluate_Call {
	_c.Call.Return(rule, err)
	return _c
}

func (_c *Evaluator_Evaluate_Call) RunAndReturn(run func(ctx context.Context, calledApp *types.App, callingAppID string, toolName string) (*types0.Rule, error)) *Evaluator_Evaluate_Call {
	_c.Call.Return(run)
	return _c
}
