// Code generated by mockery. DO NOT EDIT.

package biz

import (
	mock "github.com/stretchr/testify/mock"
	biz "github.com/tnb-labs/panel/internal/biz"
)

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

type UserRepo_Expecter struct {
	mock *mock.Mock
}

func (_m *UserRepo) EXPECT() *UserRepo_Expecter {
	return &UserRepo_Expecter{mock: &_m.Mock}
}

// CheckPassword provides a mock function with given fields: username, password
func (_m *UserRepo) CheckPassword(username string, password string) (*biz.User, error) {
	ret := _m.Called(username, password)

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

	var r0 *biz.User
	var r1 error
	if rf, ok := ret.Get(0).(func(string, string) (*biz.User, error)); ok {
		return rf(username, password)
	}
	if rf, ok := ret.Get(0).(func(string, string) *biz.User); ok {
		r0 = rf(username, password)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*biz.User)
		}
	}

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

	return r0, r1
}

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

// CheckPassword is a helper method to define mock.On call
//   - username string
//   - password string
func (_e *UserRepo_Expecter) CheckPassword(username interface{}, password interface{}) *UserRepo_CheckPassword_Call {
	return &UserRepo_CheckPassword_Call{Call: _e.mock.On("CheckPassword", username, password)}
}

func (_c *UserRepo_CheckPassword_Call) Run(run func(username string, password string)) *UserRepo_CheckPassword_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(string))
	})
	return _c
}

func (_c *UserRepo_CheckPassword_Call) Return(_a0 *biz.User, _a1 error) *UserRepo_CheckPassword_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *UserRepo_CheckPassword_Call) RunAndReturn(run func(string, string) (*biz.User, error)) *UserRepo_CheckPassword_Call {
	_c.Call.Return(run)
	return _c
}

// Create provides a mock function with given fields: username, password
func (_m *UserRepo) Create(username string, password string) (*biz.User, error) {
	ret := _m.Called(username, password)

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

	var r0 *biz.User
	var r1 error
	if rf, ok := ret.Get(0).(func(string, string) (*biz.User, error)); ok {
		return rf(username, password)
	}
	if rf, ok := ret.Get(0).(func(string, string) *biz.User); ok {
		r0 = rf(username, password)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*biz.User)
		}
	}

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

	return r0, r1
}

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

// Create is a helper method to define mock.On call
//   - username string
//   - password string
func (_e *UserRepo_Expecter) Create(username interface{}, password interface{}) *UserRepo_Create_Call {
	return &UserRepo_Create_Call{Call: _e.mock.On("Create", username, password)}
}

func (_c *UserRepo_Create_Call) Run(run func(username string, password string)) *UserRepo_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string), args[1].(string))
	})
	return _c
}

func (_c *UserRepo_Create_Call) Return(_a0 *biz.User, _a1 error) *UserRepo_Create_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *UserRepo_Create_Call) RunAndReturn(run func(string, string) (*biz.User, error)) *UserRepo_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function with given fields: id
func (_m *UserRepo) Get(id uint) (*biz.User, error) {
	ret := _m.Called(id)

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

	var r0 *biz.User
	var r1 error
	if rf, ok := ret.Get(0).(func(uint) (*biz.User, error)); ok {
		return rf(id)
	}
	if rf, ok := ret.Get(0).(func(uint) *biz.User); ok {
		r0 = rf(id)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*biz.User)
		}
	}

	if rf, ok := ret.Get(1).(func(uint) error); ok {
		r1 = rf(id)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - id uint
func (_e *UserRepo_Expecter) Get(id interface{}) *UserRepo_Get_Call {
	return &UserRepo_Get_Call{Call: _e.mock.On("Get", id)}
}

func (_c *UserRepo_Get_Call) Run(run func(id uint)) *UserRepo_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(uint))
	})
	return _c
}

func (_c *UserRepo_Get_Call) Return(_a0 *biz.User, _a1 error) *UserRepo_Get_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *UserRepo_Get_Call) RunAndReturn(run func(uint) (*biz.User, error)) *UserRepo_Get_Call {
	_c.Call.Return(run)
	return _c
}

// Save provides a mock function with given fields: user
func (_m *UserRepo) Save(user *biz.User) error {
	ret := _m.Called(user)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(*biz.User) error); ok {
		r0 = rf(user)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Save is a helper method to define mock.On call
//   - user *biz.User
func (_e *UserRepo_Expecter) Save(user interface{}) *UserRepo_Save_Call {
	return &UserRepo_Save_Call{Call: _e.mock.On("Save", user)}
}

func (_c *UserRepo_Save_Call) Run(run func(user *biz.User)) *UserRepo_Save_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(*biz.User))
	})
	return _c
}

func (_c *UserRepo_Save_Call) Return(_a0 error) *UserRepo_Save_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *UserRepo_Save_Call) RunAndReturn(run func(*biz.User) error) *UserRepo_Save_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
