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

package mocks

import (
	"context"

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

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

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

	return mock
}

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

type PersonService_Expecter struct {
	mock *mock.Mock
}

func (_m *PersonService) EXPECT() *PersonService_Expecter {
	return &PersonService_Expecter{mock: &_m.Mock}
}

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

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

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

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

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

func (_c *PersonService_Get_Call) Run(run func(ctx context.Context, id model.PersonID)) *PersonService_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.PersonID
		if args[1] != nil {
			arg1 = args[1].(model.PersonID)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *PersonService_Get_Call) Return(person model.Person, err error) *PersonService_Get_Call {
	_c.Call.Return(person, err)
	return _c
}

func (_c *PersonService_Get_Call) RunAndReturn(run func(ctx context.Context, id model.PersonID) (model.Person, error)) *PersonService_Get_Call {
	_c.Call.Return(run)
	return _c
}

// GetCharacterRelated provides a mock function for the type PersonService
func (_mock *PersonService) GetCharacterRelated(ctx context.Context, characterID model.CharacterID) ([]model.PersonCharacterRelation, error) {
	ret := _mock.Called(ctx, characterID)

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

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

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

// GetCharacterRelated is a helper method to define mock.On call
//   - ctx context.Context
//   - characterID model.CharacterID
func (_e *PersonService_Expecter) GetCharacterRelated(ctx interface{}, characterID interface{}) *PersonService_GetCharacterRelated_Call {
	return &PersonService_GetCharacterRelated_Call{Call: _e.mock.On("GetCharacterRelated", ctx, characterID)}
}

func (_c *PersonService_GetCharacterRelated_Call) Run(run func(ctx context.Context, characterID model.CharacterID)) *PersonService_GetCharacterRelated_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 *PersonService_GetCharacterRelated_Call) Return(personCharacterRelations []model.PersonCharacterRelation, err error) *PersonService_GetCharacterRelated_Call {
	_c.Call.Return(personCharacterRelations, err)
	return _c
}

func (_c *PersonService_GetCharacterRelated_Call) RunAndReturn(run func(ctx context.Context, characterID model.CharacterID) ([]model.PersonCharacterRelation, error)) *PersonService_GetCharacterRelated_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	var r0 []model.SubjectPersonRelation
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.SubjectID) ([]model.SubjectPersonRelation, error)); ok {
		return returnFunc(ctx, subjectID)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, model.SubjectID) []model.SubjectPersonRelation); ok {
		r0 = returnFunc(ctx, subjectID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]model.SubjectPersonRelation)
		}
	}
	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
}

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

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

func (_c *PersonService_GetSubjectRelated_Call) Run(run func(ctx context.Context, subjectID model.SubjectID)) *PersonService_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 *PersonService_GetSubjectRelated_Call) Return(subjectPersonRelations []model.SubjectPersonRelation, err error) *PersonService_GetSubjectRelated_Call {
	_c.Call.Return(subjectPersonRelations, err)
	return _c
}

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