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

package mocks

import (
	"context"

	"github.com/bangumi/server/domain"
	"github.com/bangumi/server/internal/character"
	"github.com/bangumi/server/internal/model"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type CharacterRepo_Expecter struct {
	mock *mock.Mock
}

func (_m *CharacterRepo) EXPECT() *CharacterRepo_Expecter {
	return &CharacterRepo_Expecter{mock: &_m.Mock}
}

// Get provides a mock function for the type CharacterRepo
func (_mock *CharacterRepo) Get(ctx context.Context, id model.CharacterID) (model.Character, error) {
	ret := _mock.Called(ctx, id)

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

	var r0 model.Character
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.CharacterID) (model.Character, error)); ok {
		return returnFunc(ctx, id)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.CharacterID) model.Character); ok {
		r0 = returnFunc(ctx, id)
	} else {
		r0 = ret.Get(0).(model.Character)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.CharacterID) error); ok {
		r1 = returnFunc(ctx, id)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - id model.CharacterID
func (_e *CharacterRepo_Expecter) Get(ctx interface{}, id interface{}) *CharacterRepo_Get_Call {
	return &CharacterRepo_Get_Call{Call: _e.mock.On("Get", ctx, id)}
}

func (_c *CharacterRepo_Get_Call) Run(run func(ctx context.Context, id model.CharacterID)) *CharacterRepo_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 model.CharacterID
		if args[1] != nil {
			arg1 = args[1].(model.CharacterID)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CharacterRepo_Get_Call) Return(character model.Character, err error) *CharacterRepo_Get_Call {
	_c.Call.Return(character, err)
	return _c
}

func (_c *CharacterRepo_Get_Call) RunAndReturn(run func(ctx context.Context, id model.CharacterID) (model.Character, error)) *CharacterRepo_Get_Call {
	_c.Call.Return(run)
	return _c
}

// GetByIDs provides a mock function for the type CharacterRepo
func (_mock *CharacterRepo) GetByIDs(ctx context.Context, ids []model.CharacterID) (map[model.CharacterID]model.Character, error) {
	ret := _mock.Called(ctx, ids)

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

	var r0 map[model.CharacterID]model.Character
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []model.CharacterID) (map[model.CharacterID]model.Character, error)); ok {
		return returnFunc(ctx, ids)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, []model.CharacterID) map[model.CharacterID]model.Character); ok {
		r0 = returnFunc(ctx, ids)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[model.CharacterID]model.Character)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, []model.CharacterID) error); ok {
		r1 = returnFunc(ctx, ids)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetByIDs is a helper method to define mock.On call
//   - ctx context.Context
//   - ids []model.CharacterID
func (_e *CharacterRepo_Expecter) GetByIDs(ctx interface{}, ids interface{}) *CharacterRepo_GetByIDs_Call {
	return &CharacterRepo_GetByIDs_Call{Call: _e.mock.On("GetByIDs", ctx, ids)}
}

func (_c *CharacterRepo_GetByIDs_Call) Run(run func(ctx context.Context, ids []model.CharacterID)) *CharacterRepo_GetByIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []model.CharacterID
		if args[1] != nil {
			arg1 = args[1].([]model.CharacterID)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CharacterRepo_GetByIDs_Call) Return(vToCharacter map[model.CharacterID]model.Character, err error) *CharacterRepo_GetByIDs_Call {
	_c.Call.Return(vToCharacter, err)
	return _c
}

func (_c *CharacterRepo_GetByIDs_Call) RunAndReturn(run func(ctx context.Context, ids []model.CharacterID) (map[model.CharacterID]model.Character, error)) *CharacterRepo_GetByIDs_Call {
	_c.Call.Return(run)
	return _c
}

// GetPersonRelated provides a mock function for the type CharacterRepo
func (_mock *CharacterRepo) GetPersonRelated(ctx context.Context, personID model.PersonID) ([]domain.PersonCharacterRelation, error) {
	ret := _mock.Called(ctx, personID)

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

	var r0 []domain.PersonCharacterRelation
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.PersonID) ([]domain.PersonCharacterRelation, error)); ok {
		return returnFunc(ctx, personID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.PersonID) []domain.PersonCharacterRelation); ok {
		r0 = returnFunc(ctx, personID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]domain.PersonCharacterRelation)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.PersonID) error); ok {
		r1 = returnFunc(ctx, personID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetPersonRelated is a helper method to define mock.On call
//   - ctx context.Context
//   - personID model.PersonID
func (_e *CharacterRepo_Expecter) GetPersonRelated(ctx interface{}, personID interface{}) *CharacterRepo_GetPersonRelated_Call {
	return &CharacterRepo_GetPersonRelated_Call{Call: _e.mock.On("GetPersonRelated", ctx, personID)}
}

func (_c *CharacterRepo_GetPersonRelated_Call) Run(run func(ctx context.Context, personID model.PersonID)) *CharacterRepo_GetPersonRelated_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 model.PersonID
		if args[1] != nil {
			arg1 = args[1].(model.PersonID)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CharacterRepo_GetPersonRelated_Call) Return(personCharacterRelations []domain.PersonCharacterRelation, err error) *CharacterRepo_GetPersonRelated_Call {
	_c.Call.Return(personCharacterRelations, err)
	return _c
}

func (_c *CharacterRepo_GetPersonRelated_Call) RunAndReturn(run func(ctx context.Context, personID model.PersonID) ([]domain.PersonCharacterRelation, error)) *CharacterRepo_GetPersonRelated_Call {
	_c.Call.Return(run)
	return _c
}

// GetSubjectRelated provides a mock function for the type CharacterRepo
func (_mock *CharacterRepo) GetSubjectRelated(ctx context.Context, subjectID model.SubjectID) ([]domain.SubjectCharacterRelation, error) {
	ret := _mock.Called(ctx, subjectID)

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

	var r0 []domain.SubjectCharacterRelation
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.SubjectID) ([]domain.SubjectCharacterRelation, error)); ok {
		return returnFunc(ctx, subjectID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.SubjectID) []domain.SubjectCharacterRelation); ok {
		r0 = returnFunc(ctx, subjectID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]domain.SubjectCharacterRelation)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, model.SubjectID) error); ok {
		r1 = returnFunc(ctx, subjectID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetSubjectRelated is a helper method to define mock.On call
//   - ctx context.Context
//   - subjectID model.SubjectID
func (_e *CharacterRepo_Expecter) GetSubjectRelated(ctx interface{}, subjectID interface{}) *CharacterRepo_GetSubjectRelated_Call {
	return &CharacterRepo_GetSubjectRelated_Call{Call: _e.mock.On("GetSubjectRelated", ctx, subjectID)}
}

func (_c *CharacterRepo_GetSubjectRelated_Call) Run(run func(ctx context.Context, subjectID model.SubjectID)) *CharacterRepo_GetSubjectRelated_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 model.SubjectID
		if args[1] != nil {
			arg1 = args[1].(model.SubjectID)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CharacterRepo_GetSubjectRelated_Call) Return(subjectCharacterRelations []domain.SubjectCharacterRelation, err error) *CharacterRepo_GetSubjectRelated_Call {
	_c.Call.Return(subjectCharacterRelations, err)
	return _c
}

func (_c *CharacterRepo_GetSubjectRelated_Call) RunAndReturn(run func(ctx context.Context, subjectID model.SubjectID) ([]domain.SubjectCharacterRelation, error)) *CharacterRepo_GetSubjectRelated_Call {
	_c.Call.Return(run)
	return _c
}

// GetSubjectRelationByIDs provides a mock function for the type CharacterRepo
func (_mock *CharacterRepo) GetSubjectRelationByIDs(ctx context.Context, ids []character.SubjectCompositeID) ([]domain.SubjectCharacterRelation, error) {
	ret := _mock.Called(ctx, ids)

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

	var r0 []domain.SubjectCharacterRelation
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []character.SubjectCompositeID) ([]domain.SubjectCharacterRelation, error)); ok {
		return returnFunc(ctx, ids)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, []character.SubjectCompositeID) []domain.SubjectCharacterRelation); ok {
		r0 = returnFunc(ctx, ids)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]domain.SubjectCharacterRelation)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, []character.SubjectCompositeID) error); ok {
		r1 = returnFunc(ctx, ids)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// GetSubjectRelationByIDs is a helper method to define mock.On call
//   - ctx context.Context
//   - ids []character.SubjectCompositeID
func (_e *CharacterRepo_Expecter) GetSubjectRelationByIDs(ctx interface{}, ids interface{}) *CharacterRepo_GetSubjectRelationByIDs_Call {
	return &CharacterRepo_GetSubjectRelationByIDs_Call{Call: _e.mock.On("GetSubjectRelationByIDs", ctx, ids)}
}

func (_c *CharacterRepo_GetSubjectRelationByIDs_Call) Run(run func(ctx context.Context, ids []character.SubjectCompositeID)) *CharacterRepo_GetSubjectRelationByIDs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []character.SubjectCompositeID
		if args[1] != nil {
			arg1 = args[1].([]character.SubjectCompositeID)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *CharacterRepo_GetSubjectRelationByIDs_Call) Return(subjectCharacterRelations []domain.SubjectCharacterRelation, err error) *CharacterRepo_GetSubjectRelationByIDs_Call {
	_c.Call.Return(subjectCharacterRelations, err)
	return _c
}

func (_c *CharacterRepo_GetSubjectRelationByIDs_Call) RunAndReturn(run func(ctx context.Context, ids []character.SubjectCompositeID) ([]domain.SubjectCharacterRelation, error)) *CharacterRepo_GetSubjectRelationByIDs_Call {
	_c.Call.Return(run)
	return _c
}
