// Code generated by mockery. DO NOT EDIT.

package mocks

import mock "github.com/stretchr/testify/mock"

// GenericInterface is an autogenerated mock type for the GenericInterface type
type GenericInterface[M any] struct {
	mock.Mock
}

type GenericInterface_Expecter[M any] struct {
	mock *mock.Mock
}

func (_m *GenericInterface[M]) EXPECT() *GenericInterface_Expecter[M] {
	return &GenericInterface_Expecter[M]{mock: &_m.Mock}
}

// Func provides a mock function with given fields: arg
func (_m *GenericInterface[M]) Func(arg *M) int {
	ret := _m.Called(arg)

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

	var r0 int
	if rf, ok := ret.Get(0).(func(*M) int); ok {
		r0 = rf(arg)
	} else {
		r0 = ret.Get(0).(int)
	}

	return r0
}

// GenericInterface_Func_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Func'
type GenericInterface_Func_Call[M any] struct {
	*mock.Call
}

// Func is a helper method to define mock.On call
//   - arg *M
func (_e *GenericInterface_Expecter[M]) Func(arg interface{}) *GenericInterface_Func_Call[M] {
	return &GenericInterface_Func_Call[M]{Call: _e.mock.On("Func", arg)}
}

func (_c *GenericInterface_Func_Call[M]) Run(run func(arg *M)) *GenericInterface_Func_Call[M] {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*M))
	})
	return _c
}

func (_c *GenericInterface_Func_Call[M]) Return(_a0 int) *GenericInterface_Func_Call[M] {
	_c.Call.Return(_a0)
	return _c
}

func (_c *GenericInterface_Func_Call[M]) RunAndReturn(run func(*M) int) *GenericInterface_Func_Call[M] {
	_c.Call.Return(run)
	return _c
}

// NewGenericInterface creates a new instance of GenericInterface. 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 NewGenericInterface[M any](t interface {
	mock.TestingT
	Cleanup(func())
}) *GenericInterface[M] {
	mock := &GenericInterface[M]{}
	mock.Mock.Test(t)

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

	return mock
}
