// 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"
)

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

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

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

	return r0
}

// GetRoles provides a mock function with given fields: tenantID, name
func (_m *IRoleDb) GetRoles(tenantID string, name string) ([]*dbmodel.Role, error) {
	ret := _m.Called(tenantID, name)

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

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

	return r0, r1
}

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

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

	return r0
}

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

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

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

	return mock
}
