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

package mocks

import (
	"context"

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

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

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

	return mock
}

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

type SessionManager_Expecter struct {
	mock *mock.Mock
}

func (_m *SessionManager) EXPECT() *SessionManager_Expecter {
	return &SessionManager_Expecter{mock: &_m.Mock}
}

// Create provides a mock function for the type SessionManager
func (_mock *SessionManager) Create(ctx context.Context, a auth.Auth) (string, session.Session, error) {
	ret := _mock.Called(ctx, a)

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

	var r0 string
	var r1 session.Session
	var r2 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, auth.Auth) (string, session.Session, error)); ok {
		return returnFunc(ctx, a)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, auth.Auth) string); ok {
		r0 = returnFunc(ctx, a)
	} else {
		r0 = ret.Get(0).(string)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, auth.Auth) session.Session); ok {
		r1 = returnFunc(ctx, a)
	} else {
		r1 = ret.Get(1).(session.Session)
	}
	if returnFunc, ok := ret.Get(2).(func(context.Context, auth.Auth) error); ok {
		r2 = returnFunc(ctx, a)
	} else {
		r2 = ret.Error(2)
	}
	return r0, r1, r2
}

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

// Create is a helper method to define mock.On call
//   - ctx context.Context
//   - a auth.Auth
func (_e *SessionManager_Expecter) Create(ctx interface{}, a interface{}) *SessionManager_Create_Call {
	return &SessionManager_Create_Call{Call: _e.mock.On("Create", ctx, a)}
}

func (_c *SessionManager_Create_Call) Run(run func(ctx context.Context, a auth.Auth)) *SessionManager_Create_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 auth.Auth
		if args[1] != nil {
			arg1 = args[1].(auth.Auth)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *SessionManager_Create_Call) Return(s string, session1 session.Session, err error) *SessionManager_Create_Call {
	_c.Call.Return(s, session1, err)
	return _c
}

func (_c *SessionManager_Create_Call) RunAndReturn(run func(ctx context.Context, a auth.Auth) (string, session.Session, error)) *SessionManager_Create_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function for the type SessionManager
func (_mock *SessionManager) Get(ctx context.Context, key string) (session.Session, error) {
	ret := _mock.Called(ctx, key)

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

	var r0 session.Session
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (session.Session, error)); ok {
		return returnFunc(ctx, key)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) session.Session); ok {
		r0 = returnFunc(ctx, key)
	} else {
		r0 = ret.Get(0).(session.Session)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = returnFunc(ctx, key)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - key string
func (_e *SessionManager_Expecter) Get(ctx interface{}, key interface{}) *SessionManager_Get_Call {
	return &SessionManager_Get_Call{Call: _e.mock.On("Get", ctx, key)}
}

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

func (_c *SessionManager_Get_Call) Return(session1 session.Session, err error) *SessionManager_Get_Call {
	_c.Call.Return(session1, err)
	return _c
}

func (_c *SessionManager_Get_Call) RunAndReturn(run func(ctx context.Context, key string) (session.Session, error)) *SessionManager_Get_Call {
	_c.Call.Return(run)
	return _c
}

// Revoke provides a mock function for the type SessionManager
func (_mock *SessionManager) Revoke(ctx context.Context, key string) error {
	ret := _mock.Called(ctx, key)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = returnFunc(ctx, key)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Revoke is a helper method to define mock.On call
//   - ctx context.Context
//   - key string
func (_e *SessionManager_Expecter) Revoke(ctx interface{}, key interface{}) *SessionManager_Revoke_Call {
	return &SessionManager_Revoke_Call{Call: _e.mock.On("Revoke", ctx, key)}
}

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

func (_c *SessionManager_Revoke_Call) Return(err error) *SessionManager_Revoke_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *SessionManager_Revoke_Call) RunAndReturn(run func(ctx context.Context, key string) error) *SessionManager_Revoke_Call {
	_c.Call.Return(run)
	return _c
}

// RevokeUser provides a mock function for the type SessionManager
func (_mock *SessionManager) RevokeUser(ctx context.Context, id model.UserID) error {
	ret := _mock.Called(ctx, id)

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

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

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

// RevokeUser is a helper method to define mock.On call
//   - ctx context.Context
//   - id model.UserID
func (_e *SessionManager_Expecter) RevokeUser(ctx interface{}, id interface{}) *SessionManager_RevokeUser_Call {
	return &SessionManager_RevokeUser_Call{Call: _e.mock.On("RevokeUser", ctx, id)}
}

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

func (_c *SessionManager_RevokeUser_Call) Return(err error) *SessionManager_RevokeUser_Call {
	_c.Call.Return(err)
	return _c
}

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