// Code generated by mockery v2.14.0. DO NOT EDIT.

package mocks

import (
	dbmodel "github.com/milvus-io/milvus/internal/metastore/db/dbmodel"
	mock "github.com/stretchr/testify/mock"
)

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

// Delete provides a mock function with given fields: tenantID, userID, roleID
func (_m *IUserRoleDb) Delete(tenantID string, userID int64, roleID int64) error {
	ret := _m.Called(tenantID, userID, roleID)

	var r0 error
	if rf, ok := ret.Get(0).(func(string, int64, int64) error); ok {
		r0 = rf(tenantID, userID, roleID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// GetUserRoles provides a mock function with given fields: tenantID, userID, roleID
func (_m *IUserRoleDb) GetUserRoles(tenantID string, userID int64, roleID int64) ([]*dbmodel.UserRole, error) {
	ret := _m.Called(tenantID, userID, roleID)

	var r0 []*dbmodel.UserRole
	if rf, ok := ret.Get(0).(func(string, int64, int64) []*dbmodel.UserRole); ok {
		r0 = rf(tenantID, userID, roleID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*dbmodel.UserRole)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, int64, int64) error); ok {
		r1 = rf(tenantID, userID, roleID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Insert provides a mock function with given fields: in
func (_m *IUserRoleDb) Insert(in *dbmodel.UserRole) error {
	ret := _m.Called(in)

	var r0 error
	if rf, ok := ret.Get(0).(func(*dbmodel.UserRole) error); ok {
		r0 = rf(in)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

type mockConstructorTestingTNewIUserRoleDb interface {
	mock.TestingT
	Cleanup(func())
}

// NewIUserRoleDb creates a new instance of IUserRoleDb. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewIUserRoleDb(t mockConstructorTestingTNewIUserRoleDb) *IUserRoleDb {
	mock := &IUserRoleDb{}
	mock.Mock.Test(t)

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

	return mock
}
