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

package granthandlersmock

import (
	"github.com/asgardeo/thunder/internal/oauth/oauth2/constants"
	"github.com/asgardeo/thunder/internal/oauth/oauth2/granthandlers"
	mock "github.com/stretchr/testify/mock"
)

// NewGrantHandlerProviderInterfaceMock creates a new instance of GrantHandlerProviderInterfaceMock. 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 NewGrantHandlerProviderInterfaceMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *GrantHandlerProviderInterfaceMock {
	mock := &GrantHandlerProviderInterfaceMock{}
	mock.Mock.Test(t)

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

	return mock
}

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

type GrantHandlerProviderInterfaceMock_Expecter struct {
	mock *mock.Mock
}

func (_m *GrantHandlerProviderInterfaceMock) EXPECT() *GrantHandlerProviderInterfaceMock_Expecter {
	return &GrantHandlerProviderInterfaceMock_Expecter{mock: &_m.Mock}
}

// GetGrantHandler provides a mock function for the type GrantHandlerProviderInterfaceMock
func (_mock *GrantHandlerProviderInterfaceMock) GetGrantHandler(grantType constants.GrantType) (granthandlers.GrantHandlerInterface, error) {
	ret := _mock.Called(grantType)

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

	var r0 granthandlers.GrantHandlerInterface
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(constants.GrantType) (granthandlers.GrantHandlerInterface, error)); ok {
		return returnFunc(grantType)
	}
	if returnFunc, ok := ret.Get(0).(func(constants.GrantType) granthandlers.GrantHandlerInterface); ok {
		r0 = returnFunc(grantType)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(granthandlers.GrantHandlerInterface)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(constants.GrantType) error); ok {
		r1 = returnFunc(grantType)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetGrantHandler is a helper method to define mock.On call
//   - grantType constants.GrantType
func (_e *GrantHandlerProviderInterfaceMock_Expecter) GetGrantHandler(grantType interface{}) *GrantHandlerProviderInterfaceMock_GetGrantHandler_Call {
	return &GrantHandlerProviderInterfaceMock_GetGrantHandler_Call{Call: _e.mock.On("GetGrantHandler", grantType)}
}

func (_c *GrantHandlerProviderInterfaceMock_GetGrantHandler_Call) Run(run func(grantType constants.GrantType)) *GrantHandlerProviderInterfaceMock_GetGrantHandler_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 constants.GrantType
		if args[0] != nil {
			arg0 = args[0].(constants.GrantType)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *GrantHandlerProviderInterfaceMock_GetGrantHandler_Call) Return(grantHandlerInterface granthandlers.GrantHandlerInterface, err error) *GrantHandlerProviderInterfaceMock_GetGrantHandler_Call {
	_c.Call.Return(grantHandlerInterface, err)
	return _c
}

func (_c *GrantHandlerProviderInterfaceMock_GetGrantHandler_Call) RunAndReturn(run func(grantType constants.GrantType) (granthandlers.GrantHandlerInterface, error)) *GrantHandlerProviderInterfaceMock_GetGrantHandler_Call {
	_c.Call.Return(run)
	return _c
}
