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

package providermock

import (
	"github.com/asgardeo/thunder/internal/system/database/provider"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type DBProviderInterfaceMock_Expecter struct {
	mock *mock.Mock
}

func (_m *DBProviderInterfaceMock) EXPECT() *DBProviderInterfaceMock_Expecter {
	return &DBProviderInterfaceMock_Expecter{mock: &_m.Mock}
}

// GetDBClient provides a mock function for the type DBProviderInterfaceMock
func (_mock *DBProviderInterfaceMock) GetDBClient(dbName string) (provider.DBClientInterface, error) {
	ret := _mock.Called(dbName)

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

	var r0 provider.DBClientInterface
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(string) (provider.DBClientInterface, error)); ok {
		return returnFunc(dbName)
	}
	if returnFunc, ok := ret.Get(0).(func(string) provider.DBClientInterface); ok {
		r0 = returnFunc(dbName)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(provider.DBClientInterface)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
		r1 = returnFunc(dbName)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetDBClient is a helper method to define mock.On call
//   - dbName string
func (_e *DBProviderInterfaceMock_Expecter) GetDBClient(dbName interface{}) *DBProviderInterfaceMock_GetDBClient_Call {
	return &DBProviderInterfaceMock_GetDBClient_Call{Call: _e.mock.On("GetDBClient", dbName)}
}

func (_c *DBProviderInterfaceMock_GetDBClient_Call) Run(run func(dbName string)) *DBProviderInterfaceMock_GetDBClient_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *DBProviderInterfaceMock_GetDBClient_Call) Return(dBClientInterface provider.DBClientInterface, err error) *DBProviderInterfaceMock_GetDBClient_Call {
	_c.Call.Return(dBClientInterface, err)
	return _c
}

func (_c *DBProviderInterfaceMock_GetDBClient_Call) RunAndReturn(run func(dbName string) (provider.DBClientInterface, error)) *DBProviderInterfaceMock_GetDBClient_Call {
	_c.Call.Return(run)
	return _c
}
