From 9c4a6ea8300bf7fdf001729ee8cfee98e7ece973 Mon Sep 17 00:00:00 2001 From: wschoepke Date: Wed, 15 Jan 2025 16:00:14 +0100 Subject: [PATCH] feat: commit mockery generated interface implementations --- .../src/mocks/services/mock_BoardReactions.go | 74 ++ .../src/mocks/services/mock_BoardSessions.go | 906 ++++++++++++++++++ .../src/mocks/services/mock_BoardTemplates.go | 608 ++++++++++++ server/src/mocks/services/mock_Boards.go | 905 +++++++++++++++++ server/src/mocks/services/mock_Feedback.go | 130 +++ server/src/mocks/services/mock_Health.go | 122 +++ server/src/mocks/services/mock_Notes.go | 382 ++++++++ server/src/mocks/services/mock_Reactions.go | 328 +++++++ server/src/mocks/services/mock_Users.go | 582 +++++++++++ server/src/mocks/services/mock_Votings.go | 443 +++++++++ 10 files changed, 4480 insertions(+) create mode 100644 server/src/mocks/services/mock_BoardReactions.go create mode 100644 server/src/mocks/services/mock_BoardSessions.go create mode 100644 server/src/mocks/services/mock_BoardTemplates.go create mode 100644 server/src/mocks/services/mock_Boards.go create mode 100644 server/src/mocks/services/mock_Feedback.go create mode 100644 server/src/mocks/services/mock_Health.go create mode 100644 server/src/mocks/services/mock_Notes.go create mode 100644 server/src/mocks/services/mock_Reactions.go create mode 100644 server/src/mocks/services/mock_Users.go create mode 100644 server/src/mocks/services/mock_Votings.go diff --git a/server/src/mocks/services/mock_BoardReactions.go b/server/src/mocks/services/mock_BoardReactions.go new file mode 100644 index 0000000000..0eee513361 --- /dev/null +++ b/server/src/mocks/services/mock_BoardReactions.go @@ -0,0 +1,74 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + dto "scrumlr.io/server/common/dto" + + uuid "github.com/google/uuid" +) + +// MockBoardReactions is an autogenerated mock type for the BoardReactions type +type MockBoardReactions struct { + mock.Mock +} + +type MockBoardReactions_Expecter struct { + mock *mock.Mock +} + +func (_m *MockBoardReactions) EXPECT() *MockBoardReactions_Expecter { + return &MockBoardReactions_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function with given fields: ctx, board, body +func (_m *MockBoardReactions) Create(ctx context.Context, board uuid.UUID, body dto.BoardReactionCreateRequest) { + _m.Called(ctx, board, body) +} + +// MockBoardReactions_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockBoardReactions_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - board uuid.UUID +// - body dto.BoardReactionCreateRequest +func (_e *MockBoardReactions_Expecter) Create(ctx interface{}, board interface{}, body interface{}) *MockBoardReactions_Create_Call { + return &MockBoardReactions_Create_Call{Call: _e.mock.On("Create", ctx, board, body)} +} + +func (_c *MockBoardReactions_Create_Call) Run(run func(ctx context.Context, board uuid.UUID, body dto.BoardReactionCreateRequest)) *MockBoardReactions_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(dto.BoardReactionCreateRequest)) + }) + return _c +} + +func (_c *MockBoardReactions_Create_Call) Return() *MockBoardReactions_Create_Call { + _c.Call.Return() + return _c +} + +func (_c *MockBoardReactions_Create_Call) RunAndReturn(run func(context.Context, uuid.UUID, dto.BoardReactionCreateRequest)) *MockBoardReactions_Create_Call { + _c.Run(run) + return _c +} + +// NewMockBoardReactions creates a new instance of MockBoardReactions. 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 NewMockBoardReactions(t interface { + mock.TestingT + Cleanup(func()) +}) *MockBoardReactions { + mock := &MockBoardReactions{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_BoardSessions.go b/server/src/mocks/services/mock_BoardSessions.go new file mode 100644 index 0000000000..bc2cac6dfd --- /dev/null +++ b/server/src/mocks/services/mock_BoardSessions.go @@ -0,0 +1,906 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + dto "scrumlr.io/server/common/dto" + filter "scrumlr.io/server/common/filter" + + mock "github.com/stretchr/testify/mock" + + uuid "github.com/google/uuid" +) + +// MockBoardSessions is an autogenerated mock type for the BoardSessions type +type MockBoardSessions struct { + mock.Mock +} + +type MockBoardSessions_Expecter struct { + mock *mock.Mock +} + +func (_m *MockBoardSessions) EXPECT() *MockBoardSessions_Expecter { + return &MockBoardSessions_Expecter{mock: &_m.Mock} +} + +// Connect provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) Connect(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) error { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for Connect") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r0 = rf(ctx, boardID, userID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockBoardSessions_Connect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Connect' +type MockBoardSessions_Connect_Call struct { + *mock.Call +} + +// Connect is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) Connect(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_Connect_Call { + return &MockBoardSessions_Connect_Call{Call: _e.mock.On("Connect", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_Connect_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_Connect_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_Connect_Call) Return(_a0 error) *MockBoardSessions_Connect_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBoardSessions_Connect_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) error) *MockBoardSessions_Connect_Call { + _c.Call.Return(run) + return _c +} + +// Create provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) Create(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) (*dto.BoardSession, error) { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *dto.BoardSession + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (*dto.BoardSession, error)); ok { + return rf(ctx, boardID, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) *dto.BoardSession); ok { + r0 = rf(ctx, boardID, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardSession) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockBoardSessions_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) Create(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_Create_Call { + return &MockBoardSessions_Create_Call{Call: _e.mock.On("Create", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_Create_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_Create_Call) Return(_a0 *dto.BoardSession, _a1 error) *MockBoardSessions_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_Create_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (*dto.BoardSession, error)) *MockBoardSessions_Create_Call { + _c.Call.Return(run) + return _c +} + +// CreateSessionRequest provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) CreateSessionRequest(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) (*dto.BoardSessionRequest, error) { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for CreateSessionRequest") + } + + var r0 *dto.BoardSessionRequest + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (*dto.BoardSessionRequest, error)); ok { + return rf(ctx, boardID, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) *dto.BoardSessionRequest); ok { + r0 = rf(ctx, boardID, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardSessionRequest) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_CreateSessionRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateSessionRequest' +type MockBoardSessions_CreateSessionRequest_Call struct { + *mock.Call +} + +// CreateSessionRequest is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) CreateSessionRequest(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_CreateSessionRequest_Call { + return &MockBoardSessions_CreateSessionRequest_Call{Call: _e.mock.On("CreateSessionRequest", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_CreateSessionRequest_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_CreateSessionRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_CreateSessionRequest_Call) Return(_a0 *dto.BoardSessionRequest, _a1 error) *MockBoardSessions_CreateSessionRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_CreateSessionRequest_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (*dto.BoardSessionRequest, error)) *MockBoardSessions_CreateSessionRequest_Call { + _c.Call.Return(run) + return _c +} + +// Disconnect provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) Disconnect(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) error { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for Disconnect") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r0 = rf(ctx, boardID, userID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockBoardSessions_Disconnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Disconnect' +type MockBoardSessions_Disconnect_Call struct { + *mock.Call +} + +// Disconnect is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) Disconnect(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_Disconnect_Call { + return &MockBoardSessions_Disconnect_Call{Call: _e.mock.On("Disconnect", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_Disconnect_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_Disconnect_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_Disconnect_Call) Return(_a0 error) *MockBoardSessions_Disconnect_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBoardSessions_Disconnect_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) error) *MockBoardSessions_Disconnect_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) Get(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) (*dto.BoardSession, error) { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *dto.BoardSession + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (*dto.BoardSession, error)); ok { + return rf(ctx, boardID, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) *dto.BoardSession); ok { + r0 = rf(ctx, boardID, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardSession) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockBoardSessions_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) Get(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_Get_Call { + return &MockBoardSessions_Get_Call{Call: _e.mock.On("Get", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_Get_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_Get_Call) Return(_a0 *dto.BoardSession, _a1 error) *MockBoardSessions_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (*dto.BoardSession, error)) *MockBoardSessions_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetSessionRequest provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) GetSessionRequest(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) (*dto.BoardSessionRequest, error) { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for GetSessionRequest") + } + + var r0 *dto.BoardSessionRequest + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (*dto.BoardSessionRequest, error)); ok { + return rf(ctx, boardID, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) *dto.BoardSessionRequest); ok { + r0 = rf(ctx, boardID, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardSessionRequest) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_GetSessionRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSessionRequest' +type MockBoardSessions_GetSessionRequest_Call struct { + *mock.Call +} + +// GetSessionRequest is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) GetSessionRequest(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_GetSessionRequest_Call { + return &MockBoardSessions_GetSessionRequest_Call{Call: _e.mock.On("GetSessionRequest", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_GetSessionRequest_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_GetSessionRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_GetSessionRequest_Call) Return(_a0 *dto.BoardSessionRequest, _a1 error) *MockBoardSessions_GetSessionRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_GetSessionRequest_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (*dto.BoardSessionRequest, error)) *MockBoardSessions_GetSessionRequest_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function with given fields: ctx, boardID, f +func (_m *MockBoardSessions) List(ctx context.Context, boardID uuid.UUID, f filter.BoardSessionFilter) ([]*dto.BoardSession, error) { + ret := _m.Called(ctx, boardID, f) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 []*dto.BoardSession + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, filter.BoardSessionFilter) ([]*dto.BoardSession, error)); ok { + return rf(ctx, boardID, f) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, filter.BoardSessionFilter) []*dto.BoardSession); ok { + r0 = rf(ctx, boardID, f) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.BoardSession) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, filter.BoardSessionFilter) error); ok { + r1 = rf(ctx, boardID, f) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type MockBoardSessions_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - f filter.BoardSessionFilter +func (_e *MockBoardSessions_Expecter) List(ctx interface{}, boardID interface{}, f interface{}) *MockBoardSessions_List_Call { + return &MockBoardSessions_List_Call{Call: _e.mock.On("List", ctx, boardID, f)} +} + +func (_c *MockBoardSessions_List_Call) Run(run func(ctx context.Context, boardID uuid.UUID, f filter.BoardSessionFilter)) *MockBoardSessions_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(filter.BoardSessionFilter)) + }) + return _c +} + +func (_c *MockBoardSessions_List_Call) Return(_a0 []*dto.BoardSession, _a1 error) *MockBoardSessions_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_List_Call) RunAndReturn(run func(context.Context, uuid.UUID, filter.BoardSessionFilter) ([]*dto.BoardSession, error)) *MockBoardSessions_List_Call { + _c.Call.Return(run) + return _c +} + +// ListSessionRequest provides a mock function with given fields: ctx, boardID, statusQuery +func (_m *MockBoardSessions) ListSessionRequest(ctx context.Context, boardID uuid.UUID, statusQuery string) ([]*dto.BoardSessionRequest, error) { + ret := _m.Called(ctx, boardID, statusQuery) + + if len(ret) == 0 { + panic("no return value specified for ListSessionRequest") + } + + var r0 []*dto.BoardSessionRequest + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string) ([]*dto.BoardSessionRequest, error)); ok { + return rf(ctx, boardID, statusQuery) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, string) []*dto.BoardSessionRequest); ok { + r0 = rf(ctx, boardID, statusQuery) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.BoardSessionRequest) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, string) error); ok { + r1 = rf(ctx, boardID, statusQuery) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_ListSessionRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSessionRequest' +type MockBoardSessions_ListSessionRequest_Call struct { + *mock.Call +} + +// ListSessionRequest is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - statusQuery string +func (_e *MockBoardSessions_Expecter) ListSessionRequest(ctx interface{}, boardID interface{}, statusQuery interface{}) *MockBoardSessions_ListSessionRequest_Call { + return &MockBoardSessions_ListSessionRequest_Call{Call: _e.mock.On("ListSessionRequest", ctx, boardID, statusQuery)} +} + +func (_c *MockBoardSessions_ListSessionRequest_Call) Run(run func(ctx context.Context, boardID uuid.UUID, statusQuery string)) *MockBoardSessions_ListSessionRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(string)) + }) + return _c +} + +func (_c *MockBoardSessions_ListSessionRequest_Call) Return(_a0 []*dto.BoardSessionRequest, _a1 error) *MockBoardSessions_ListSessionRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_ListSessionRequest_Call) RunAndReturn(run func(context.Context, uuid.UUID, string) ([]*dto.BoardSessionRequest, error)) *MockBoardSessions_ListSessionRequest_Call { + _c.Call.Return(run) + return _c +} + +// ModeratorSessionExists provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) ModeratorSessionExists(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) (bool, error) { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for ModeratorSessionExists") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (bool, error)); ok { + return rf(ctx, boardID, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) bool); ok { + r0 = rf(ctx, boardID, userID) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_ModeratorSessionExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ModeratorSessionExists' +type MockBoardSessions_ModeratorSessionExists_Call struct { + *mock.Call +} + +// ModeratorSessionExists is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) ModeratorSessionExists(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_ModeratorSessionExists_Call { + return &MockBoardSessions_ModeratorSessionExists_Call{Call: _e.mock.On("ModeratorSessionExists", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_ModeratorSessionExists_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_ModeratorSessionExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_ModeratorSessionExists_Call) Return(_a0 bool, _a1 error) *MockBoardSessions_ModeratorSessionExists_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_ModeratorSessionExists_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (bool, error)) *MockBoardSessions_ModeratorSessionExists_Call { + _c.Call.Return(run) + return _c +} + +// ParticipantBanned provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) ParticipantBanned(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) (bool, error) { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for ParticipantBanned") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (bool, error)); ok { + return rf(ctx, boardID, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) bool); ok { + r0 = rf(ctx, boardID, userID) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_ParticipantBanned_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ParticipantBanned' +type MockBoardSessions_ParticipantBanned_Call struct { + *mock.Call +} + +// ParticipantBanned is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) ParticipantBanned(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_ParticipantBanned_Call { + return &MockBoardSessions_ParticipantBanned_Call{Call: _e.mock.On("ParticipantBanned", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_ParticipantBanned_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_ParticipantBanned_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_ParticipantBanned_Call) Return(_a0 bool, _a1 error) *MockBoardSessions_ParticipantBanned_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_ParticipantBanned_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (bool, error)) *MockBoardSessions_ParticipantBanned_Call { + _c.Call.Return(run) + return _c +} + +// SessionExists provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) SessionExists(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) (bool, error) { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for SessionExists") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (bool, error)); ok { + return rf(ctx, boardID, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) bool); ok { + r0 = rf(ctx, boardID, userID) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_SessionExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SessionExists' +type MockBoardSessions_SessionExists_Call struct { + *mock.Call +} + +// SessionExists is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) SessionExists(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_SessionExists_Call { + return &MockBoardSessions_SessionExists_Call{Call: _e.mock.On("SessionExists", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_SessionExists_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_SessionExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_SessionExists_Call) Return(_a0 bool, _a1 error) *MockBoardSessions_SessionExists_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_SessionExists_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (bool, error)) *MockBoardSessions_SessionExists_Call { + _c.Call.Return(run) + return _c +} + +// SessionRequestExists provides a mock function with given fields: ctx, boardID, userID +func (_m *MockBoardSessions) SessionRequestExists(ctx context.Context, boardID uuid.UUID, userID uuid.UUID) (bool, error) { + ret := _m.Called(ctx, boardID, userID) + + if len(ret) == 0 { + panic("no return value specified for SessionRequestExists") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (bool, error)); ok { + return rf(ctx, boardID, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) bool); ok { + r0 = rf(ctx, boardID, userID) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_SessionRequestExists_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SessionRequestExists' +type MockBoardSessions_SessionRequestExists_Call struct { + *mock.Call +} + +// SessionRequestExists is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - userID uuid.UUID +func (_e *MockBoardSessions_Expecter) SessionRequestExists(ctx interface{}, boardID interface{}, userID interface{}) *MockBoardSessions_SessionRequestExists_Call { + return &MockBoardSessions_SessionRequestExists_Call{Call: _e.mock.On("SessionRequestExists", ctx, boardID, userID)} +} + +func (_c *MockBoardSessions_SessionRequestExists_Call) Run(run func(ctx context.Context, boardID uuid.UUID, userID uuid.UUID)) *MockBoardSessions_SessionRequestExists_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardSessions_SessionRequestExists_Call) Return(_a0 bool, _a1 error) *MockBoardSessions_SessionRequestExists_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_SessionRequestExists_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (bool, error)) *MockBoardSessions_SessionRequestExists_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, body +func (_m *MockBoardSessions) Update(ctx context.Context, body dto.BoardSessionUpdateRequest) (*dto.BoardSession, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *dto.BoardSession + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardSessionUpdateRequest) (*dto.BoardSession, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardSessionUpdateRequest) *dto.BoardSession); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardSession) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.BoardSessionUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockBoardSessions_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - body dto.BoardSessionUpdateRequest +func (_e *MockBoardSessions_Expecter) Update(ctx interface{}, body interface{}) *MockBoardSessions_Update_Call { + return &MockBoardSessions_Update_Call{Call: _e.mock.On("Update", ctx, body)} +} + +func (_c *MockBoardSessions_Update_Call) Run(run func(ctx context.Context, body dto.BoardSessionUpdateRequest)) *MockBoardSessions_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.BoardSessionUpdateRequest)) + }) + return _c +} + +func (_c *MockBoardSessions_Update_Call) Return(_a0 *dto.BoardSession, _a1 error) *MockBoardSessions_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_Update_Call) RunAndReturn(run func(context.Context, dto.BoardSessionUpdateRequest) (*dto.BoardSession, error)) *MockBoardSessions_Update_Call { + _c.Call.Return(run) + return _c +} + +// UpdateAll provides a mock function with given fields: ctx, body +func (_m *MockBoardSessions) UpdateAll(ctx context.Context, body dto.BoardSessionsUpdateRequest) ([]*dto.BoardSession, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for UpdateAll") + } + + var r0 []*dto.BoardSession + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardSessionsUpdateRequest) ([]*dto.BoardSession, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardSessionsUpdateRequest) []*dto.BoardSession); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.BoardSession) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.BoardSessionsUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_UpdateAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAll' +type MockBoardSessions_UpdateAll_Call struct { + *mock.Call +} + +// UpdateAll is a helper method to define mock.On call +// - ctx context.Context +// - body dto.BoardSessionsUpdateRequest +func (_e *MockBoardSessions_Expecter) UpdateAll(ctx interface{}, body interface{}) *MockBoardSessions_UpdateAll_Call { + return &MockBoardSessions_UpdateAll_Call{Call: _e.mock.On("UpdateAll", ctx, body)} +} + +func (_c *MockBoardSessions_UpdateAll_Call) Run(run func(ctx context.Context, body dto.BoardSessionsUpdateRequest)) *MockBoardSessions_UpdateAll_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.BoardSessionsUpdateRequest)) + }) + return _c +} + +func (_c *MockBoardSessions_UpdateAll_Call) Return(_a0 []*dto.BoardSession, _a1 error) *MockBoardSessions_UpdateAll_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_UpdateAll_Call) RunAndReturn(run func(context.Context, dto.BoardSessionsUpdateRequest) ([]*dto.BoardSession, error)) *MockBoardSessions_UpdateAll_Call { + _c.Call.Return(run) + return _c +} + +// UpdateSessionRequest provides a mock function with given fields: ctx, body +func (_m *MockBoardSessions) UpdateSessionRequest(ctx context.Context, body dto.BoardSessionRequestUpdate) (*dto.BoardSessionRequest, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for UpdateSessionRequest") + } + + var r0 *dto.BoardSessionRequest + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardSessionRequestUpdate) (*dto.BoardSessionRequest, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardSessionRequestUpdate) *dto.BoardSessionRequest); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardSessionRequest) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.BoardSessionRequestUpdate) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardSessions_UpdateSessionRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSessionRequest' +type MockBoardSessions_UpdateSessionRequest_Call struct { + *mock.Call +} + +// UpdateSessionRequest is a helper method to define mock.On call +// - ctx context.Context +// - body dto.BoardSessionRequestUpdate +func (_e *MockBoardSessions_Expecter) UpdateSessionRequest(ctx interface{}, body interface{}) *MockBoardSessions_UpdateSessionRequest_Call { + return &MockBoardSessions_UpdateSessionRequest_Call{Call: _e.mock.On("UpdateSessionRequest", ctx, body)} +} + +func (_c *MockBoardSessions_UpdateSessionRequest_Call) Run(run func(ctx context.Context, body dto.BoardSessionRequestUpdate)) *MockBoardSessions_UpdateSessionRequest_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.BoardSessionRequestUpdate)) + }) + return _c +} + +func (_c *MockBoardSessions_UpdateSessionRequest_Call) Return(_a0 *dto.BoardSessionRequest, _a1 error) *MockBoardSessions_UpdateSessionRequest_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardSessions_UpdateSessionRequest_Call) RunAndReturn(run func(context.Context, dto.BoardSessionRequestUpdate) (*dto.BoardSessionRequest, error)) *MockBoardSessions_UpdateSessionRequest_Call { + _c.Call.Return(run) + return _c +} + +// NewMockBoardSessions creates a new instance of MockBoardSessions. 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 NewMockBoardSessions(t interface { + mock.TestingT + Cleanup(func()) +}) *MockBoardSessions { + mock := &MockBoardSessions{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_BoardTemplates.go b/server/src/mocks/services/mock_BoardTemplates.go new file mode 100644 index 0000000000..5511784877 --- /dev/null +++ b/server/src/mocks/services/mock_BoardTemplates.go @@ -0,0 +1,608 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + dto "scrumlr.io/server/common/dto" + + uuid "github.com/google/uuid" +) + +// MockBoardTemplates is an autogenerated mock type for the BoardTemplates type +type MockBoardTemplates struct { + mock.Mock +} + +type MockBoardTemplates_Expecter struct { + mock *mock.Mock +} + +func (_m *MockBoardTemplates) EXPECT() *MockBoardTemplates_Expecter { + return &MockBoardTemplates_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function with given fields: ctx, body +func (_m *MockBoardTemplates) Create(ctx context.Context, body dto.CreateBoardTemplateRequest) (*dto.BoardTemplate, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *dto.BoardTemplate + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.CreateBoardTemplateRequest) (*dto.BoardTemplate, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.CreateBoardTemplateRequest) *dto.BoardTemplate); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardTemplate) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.CreateBoardTemplateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardTemplates_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockBoardTemplates_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - body dto.CreateBoardTemplateRequest +func (_e *MockBoardTemplates_Expecter) Create(ctx interface{}, body interface{}) *MockBoardTemplates_Create_Call { + return &MockBoardTemplates_Create_Call{Call: _e.mock.On("Create", ctx, body)} +} + +func (_c *MockBoardTemplates_Create_Call) Run(run func(ctx context.Context, body dto.CreateBoardTemplateRequest)) *MockBoardTemplates_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.CreateBoardTemplateRequest)) + }) + return _c +} + +func (_c *MockBoardTemplates_Create_Call) Return(_a0 *dto.BoardTemplate, _a1 error) *MockBoardTemplates_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardTemplates_Create_Call) RunAndReturn(run func(context.Context, dto.CreateBoardTemplateRequest) (*dto.BoardTemplate, error)) *MockBoardTemplates_Create_Call { + _c.Call.Return(run) + return _c +} + +// CreateColumnTemplate provides a mock function with given fields: ctx, body +func (_m *MockBoardTemplates) CreateColumnTemplate(ctx context.Context, body dto.ColumnTemplateRequest) (*dto.ColumnTemplate, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for CreateColumnTemplate") + } + + var r0 *dto.ColumnTemplate + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.ColumnTemplateRequest) (*dto.ColumnTemplate, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.ColumnTemplateRequest) *dto.ColumnTemplate); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.ColumnTemplate) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.ColumnTemplateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardTemplates_CreateColumnTemplate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateColumnTemplate' +type MockBoardTemplates_CreateColumnTemplate_Call struct { + *mock.Call +} + +// CreateColumnTemplate is a helper method to define mock.On call +// - ctx context.Context +// - body dto.ColumnTemplateRequest +func (_e *MockBoardTemplates_Expecter) CreateColumnTemplate(ctx interface{}, body interface{}) *MockBoardTemplates_CreateColumnTemplate_Call { + return &MockBoardTemplates_CreateColumnTemplate_Call{Call: _e.mock.On("CreateColumnTemplate", ctx, body)} +} + +func (_c *MockBoardTemplates_CreateColumnTemplate_Call) Run(run func(ctx context.Context, body dto.ColumnTemplateRequest)) *MockBoardTemplates_CreateColumnTemplate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.ColumnTemplateRequest)) + }) + return _c +} + +func (_c *MockBoardTemplates_CreateColumnTemplate_Call) Return(_a0 *dto.ColumnTemplate, _a1 error) *MockBoardTemplates_CreateColumnTemplate_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardTemplates_CreateColumnTemplate_Call) RunAndReturn(run func(context.Context, dto.ColumnTemplateRequest) (*dto.ColumnTemplate, error)) *MockBoardTemplates_CreateColumnTemplate_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function with given fields: ctx, id +func (_m *MockBoardTemplates) Delete(ctx context.Context, id uuid.UUID) error { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) error); ok { + r0 = rf(ctx, id) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockBoardTemplates_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type MockBoardTemplates_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockBoardTemplates_Expecter) Delete(ctx interface{}, id interface{}) *MockBoardTemplates_Delete_Call { + return &MockBoardTemplates_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *MockBoardTemplates_Delete_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockBoardTemplates_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardTemplates_Delete_Call) Return(_a0 error) *MockBoardTemplates_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBoardTemplates_Delete_Call) RunAndReturn(run func(context.Context, uuid.UUID) error) *MockBoardTemplates_Delete_Call { + _c.Call.Return(run) + return _c +} + +// DeleteColumnTemplate provides a mock function with given fields: ctx, boar, column, user +func (_m *MockBoardTemplates) DeleteColumnTemplate(ctx context.Context, boar uuid.UUID, column uuid.UUID, user uuid.UUID) error { + ret := _m.Called(ctx, boar, column, user) + + if len(ret) == 0 { + panic("no return value specified for DeleteColumnTemplate") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID) error); ok { + r0 = rf(ctx, boar, column, user) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockBoardTemplates_DeleteColumnTemplate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteColumnTemplate' +type MockBoardTemplates_DeleteColumnTemplate_Call struct { + *mock.Call +} + +// DeleteColumnTemplate is a helper method to define mock.On call +// - ctx context.Context +// - boar uuid.UUID +// - column uuid.UUID +// - user uuid.UUID +func (_e *MockBoardTemplates_Expecter) DeleteColumnTemplate(ctx interface{}, boar interface{}, column interface{}, user interface{}) *MockBoardTemplates_DeleteColumnTemplate_Call { + return &MockBoardTemplates_DeleteColumnTemplate_Call{Call: _e.mock.On("DeleteColumnTemplate", ctx, boar, column, user)} +} + +func (_c *MockBoardTemplates_DeleteColumnTemplate_Call) Run(run func(ctx context.Context, boar uuid.UUID, column uuid.UUID, user uuid.UUID)) *MockBoardTemplates_DeleteColumnTemplate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID), args[3].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardTemplates_DeleteColumnTemplate_Call) Return(_a0 error) *MockBoardTemplates_DeleteColumnTemplate_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBoardTemplates_DeleteColumnTemplate_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID) error) *MockBoardTemplates_DeleteColumnTemplate_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, id +func (_m *MockBoardTemplates) Get(ctx context.Context, id uuid.UUID) (*dto.BoardTemplate, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *dto.BoardTemplate + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*dto.BoardTemplate, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *dto.BoardTemplate); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardTemplate) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardTemplates_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockBoardTemplates_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockBoardTemplates_Expecter) Get(ctx interface{}, id interface{}) *MockBoardTemplates_Get_Call { + return &MockBoardTemplates_Get_Call{Call: _e.mock.On("Get", ctx, id)} +} + +func (_c *MockBoardTemplates_Get_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockBoardTemplates_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardTemplates_Get_Call) Return(_a0 *dto.BoardTemplate, _a1 error) *MockBoardTemplates_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardTemplates_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*dto.BoardTemplate, error)) *MockBoardTemplates_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetColumnTemplate provides a mock function with given fields: ctx, boardID, columnID +func (_m *MockBoardTemplates) GetColumnTemplate(ctx context.Context, boardID uuid.UUID, columnID uuid.UUID) (*dto.ColumnTemplate, error) { + ret := _m.Called(ctx, boardID, columnID) + + if len(ret) == 0 { + panic("no return value specified for GetColumnTemplate") + } + + var r0 *dto.ColumnTemplate + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (*dto.ColumnTemplate, error)); ok { + return rf(ctx, boardID, columnID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) *dto.ColumnTemplate); ok { + r0 = rf(ctx, boardID, columnID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.ColumnTemplate) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, columnID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardTemplates_GetColumnTemplate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetColumnTemplate' +type MockBoardTemplates_GetColumnTemplate_Call struct { + *mock.Call +} + +// GetColumnTemplate is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - columnID uuid.UUID +func (_e *MockBoardTemplates_Expecter) GetColumnTemplate(ctx interface{}, boardID interface{}, columnID interface{}) *MockBoardTemplates_GetColumnTemplate_Call { + return &MockBoardTemplates_GetColumnTemplate_Call{Call: _e.mock.On("GetColumnTemplate", ctx, boardID, columnID)} +} + +func (_c *MockBoardTemplates_GetColumnTemplate_Call) Run(run func(ctx context.Context, boardID uuid.UUID, columnID uuid.UUID)) *MockBoardTemplates_GetColumnTemplate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardTemplates_GetColumnTemplate_Call) Return(_a0 *dto.ColumnTemplate, _a1 error) *MockBoardTemplates_GetColumnTemplate_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardTemplates_GetColumnTemplate_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (*dto.ColumnTemplate, error)) *MockBoardTemplates_GetColumnTemplate_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function with given fields: ctx, user +func (_m *MockBoardTemplates) List(ctx context.Context, user uuid.UUID) ([]*dto.BoardTemplateFull, error) { + ret := _m.Called(ctx, user) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 []*dto.BoardTemplateFull + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) ([]*dto.BoardTemplateFull, error)); ok { + return rf(ctx, user) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) []*dto.BoardTemplateFull); ok { + r0 = rf(ctx, user) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.BoardTemplateFull) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, user) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardTemplates_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type MockBoardTemplates_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - user uuid.UUID +func (_e *MockBoardTemplates_Expecter) List(ctx interface{}, user interface{}) *MockBoardTemplates_List_Call { + return &MockBoardTemplates_List_Call{Call: _e.mock.On("List", ctx, user)} +} + +func (_c *MockBoardTemplates_List_Call) Run(run func(ctx context.Context, user uuid.UUID)) *MockBoardTemplates_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardTemplates_List_Call) Return(_a0 []*dto.BoardTemplateFull, _a1 error) *MockBoardTemplates_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardTemplates_List_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]*dto.BoardTemplateFull, error)) *MockBoardTemplates_List_Call { + _c.Call.Return(run) + return _c +} + +// ListColumnTemplates provides a mock function with given fields: ctx, board +func (_m *MockBoardTemplates) ListColumnTemplates(ctx context.Context, board uuid.UUID) ([]*dto.ColumnTemplate, error) { + ret := _m.Called(ctx, board) + + if len(ret) == 0 { + panic("no return value specified for ListColumnTemplates") + } + + var r0 []*dto.ColumnTemplate + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) ([]*dto.ColumnTemplate, error)); ok { + return rf(ctx, board) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) []*dto.ColumnTemplate); ok { + r0 = rf(ctx, board) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.ColumnTemplate) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, board) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardTemplates_ListColumnTemplates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListColumnTemplates' +type MockBoardTemplates_ListColumnTemplates_Call struct { + *mock.Call +} + +// ListColumnTemplates is a helper method to define mock.On call +// - ctx context.Context +// - board uuid.UUID +func (_e *MockBoardTemplates_Expecter) ListColumnTemplates(ctx interface{}, board interface{}) *MockBoardTemplates_ListColumnTemplates_Call { + return &MockBoardTemplates_ListColumnTemplates_Call{Call: _e.mock.On("ListColumnTemplates", ctx, board)} +} + +func (_c *MockBoardTemplates_ListColumnTemplates_Call) Run(run func(ctx context.Context, board uuid.UUID)) *MockBoardTemplates_ListColumnTemplates_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoardTemplates_ListColumnTemplates_Call) Return(_a0 []*dto.ColumnTemplate, _a1 error) *MockBoardTemplates_ListColumnTemplates_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardTemplates_ListColumnTemplates_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]*dto.ColumnTemplate, error)) *MockBoardTemplates_ListColumnTemplates_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, body +func (_m *MockBoardTemplates) Update(ctx context.Context, body dto.BoardTemplateUpdateRequest) (*dto.BoardTemplate, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *dto.BoardTemplate + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardTemplateUpdateRequest) (*dto.BoardTemplate, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardTemplateUpdateRequest) *dto.BoardTemplate); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.BoardTemplate) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.BoardTemplateUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardTemplates_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockBoardTemplates_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - body dto.BoardTemplateUpdateRequest +func (_e *MockBoardTemplates_Expecter) Update(ctx interface{}, body interface{}) *MockBoardTemplates_Update_Call { + return &MockBoardTemplates_Update_Call{Call: _e.mock.On("Update", ctx, body)} +} + +func (_c *MockBoardTemplates_Update_Call) Run(run func(ctx context.Context, body dto.BoardTemplateUpdateRequest)) *MockBoardTemplates_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.BoardTemplateUpdateRequest)) + }) + return _c +} + +func (_c *MockBoardTemplates_Update_Call) Return(_a0 *dto.BoardTemplate, _a1 error) *MockBoardTemplates_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardTemplates_Update_Call) RunAndReturn(run func(context.Context, dto.BoardTemplateUpdateRequest) (*dto.BoardTemplate, error)) *MockBoardTemplates_Update_Call { + _c.Call.Return(run) + return _c +} + +// UpdateColumnTemplate provides a mock function with given fields: ctx, body +func (_m *MockBoardTemplates) UpdateColumnTemplate(ctx context.Context, body dto.ColumnTemplateUpdateRequest) (*dto.ColumnTemplate, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for UpdateColumnTemplate") + } + + var r0 *dto.ColumnTemplate + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.ColumnTemplateUpdateRequest) (*dto.ColumnTemplate, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.ColumnTemplateUpdateRequest) *dto.ColumnTemplate); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.ColumnTemplate) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.ColumnTemplateUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoardTemplates_UpdateColumnTemplate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateColumnTemplate' +type MockBoardTemplates_UpdateColumnTemplate_Call struct { + *mock.Call +} + +// UpdateColumnTemplate is a helper method to define mock.On call +// - ctx context.Context +// - body dto.ColumnTemplateUpdateRequest +func (_e *MockBoardTemplates_Expecter) UpdateColumnTemplate(ctx interface{}, body interface{}) *MockBoardTemplates_UpdateColumnTemplate_Call { + return &MockBoardTemplates_UpdateColumnTemplate_Call{Call: _e.mock.On("UpdateColumnTemplate", ctx, body)} +} + +func (_c *MockBoardTemplates_UpdateColumnTemplate_Call) Run(run func(ctx context.Context, body dto.ColumnTemplateUpdateRequest)) *MockBoardTemplates_UpdateColumnTemplate_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.ColumnTemplateUpdateRequest)) + }) + return _c +} + +func (_c *MockBoardTemplates_UpdateColumnTemplate_Call) Return(_a0 *dto.ColumnTemplate, _a1 error) *MockBoardTemplates_UpdateColumnTemplate_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoardTemplates_UpdateColumnTemplate_Call) RunAndReturn(run func(context.Context, dto.ColumnTemplateUpdateRequest) (*dto.ColumnTemplate, error)) *MockBoardTemplates_UpdateColumnTemplate_Call { + _c.Call.Return(run) + return _c +} + +// NewMockBoardTemplates creates a new instance of MockBoardTemplates. 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 NewMockBoardTemplates(t interface { + mock.TestingT + Cleanup(func()) +}) *MockBoardTemplates { + mock := &MockBoardTemplates{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_Boards.go b/server/src/mocks/services/mock_Boards.go new file mode 100644 index 0000000000..34ade264b0 --- /dev/null +++ b/server/src/mocks/services/mock_Boards.go @@ -0,0 +1,905 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + dto "scrumlr.io/server/common/dto" + + uuid "github.com/google/uuid" +) + +// MockBoards is an autogenerated mock type for the Boards type +type MockBoards struct { + mock.Mock +} + +type MockBoards_Expecter struct { + mock *mock.Mock +} + +func (_m *MockBoards) EXPECT() *MockBoards_Expecter { + return &MockBoards_Expecter{mock: &_m.Mock} +} + +// BoardOverview provides a mock function with given fields: ctx, boardIDs, user +func (_m *MockBoards) BoardOverview(ctx context.Context, boardIDs []uuid.UUID, user uuid.UUID) ([]*dto.BoardOverview, error) { + ret := _m.Called(ctx, boardIDs, user) + + if len(ret) == 0 { + panic("no return value specified for BoardOverview") + } + + var r0 []*dto.BoardOverview + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []uuid.UUID, uuid.UUID) ([]*dto.BoardOverview, error)); ok { + return rf(ctx, boardIDs, user) + } + if rf, ok := ret.Get(0).(func(context.Context, []uuid.UUID, uuid.UUID) []*dto.BoardOverview); ok { + r0 = rf(ctx, boardIDs, user) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.BoardOverview) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, []uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardIDs, user) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_BoardOverview_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BoardOverview' +type MockBoards_BoardOverview_Call struct { + *mock.Call +} + +// BoardOverview is a helper method to define mock.On call +// - ctx context.Context +// - boardIDs []uuid.UUID +// - user uuid.UUID +func (_e *MockBoards_Expecter) BoardOverview(ctx interface{}, boardIDs interface{}, user interface{}) *MockBoards_BoardOverview_Call { + return &MockBoards_BoardOverview_Call{Call: _e.mock.On("BoardOverview", ctx, boardIDs, user)} +} + +func (_c *MockBoards_BoardOverview_Call) Run(run func(ctx context.Context, boardIDs []uuid.UUID, user uuid.UUID)) *MockBoards_BoardOverview_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].([]uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_BoardOverview_Call) Return(_a0 []*dto.BoardOverview, _a1 error) *MockBoards_BoardOverview_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_BoardOverview_Call) RunAndReturn(run func(context.Context, []uuid.UUID, uuid.UUID) ([]*dto.BoardOverview, error)) *MockBoards_BoardOverview_Call { + _c.Call.Return(run) + return _c +} + +// Create provides a mock function with given fields: ctx, body +func (_m *MockBoards) Create(ctx context.Context, body dto.CreateBoardRequest) (*dto.Board, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *dto.Board + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.CreateBoardRequest) (*dto.Board, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.CreateBoardRequest) *dto.Board); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Board) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.CreateBoardRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockBoards_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - body dto.CreateBoardRequest +func (_e *MockBoards_Expecter) Create(ctx interface{}, body interface{}) *MockBoards_Create_Call { + return &MockBoards_Create_Call{Call: _e.mock.On("Create", ctx, body)} +} + +func (_c *MockBoards_Create_Call) Run(run func(ctx context.Context, body dto.CreateBoardRequest)) *MockBoards_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.CreateBoardRequest)) + }) + return _c +} + +func (_c *MockBoards_Create_Call) Return(_a0 *dto.Board, _a1 error) *MockBoards_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_Create_Call) RunAndReturn(run func(context.Context, dto.CreateBoardRequest) (*dto.Board, error)) *MockBoards_Create_Call { + _c.Call.Return(run) + return _c +} + +// CreateColumn provides a mock function with given fields: ctx, body +func (_m *MockBoards) CreateColumn(ctx context.Context, body dto.ColumnRequest) (*dto.Column, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for CreateColumn") + } + + var r0 *dto.Column + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.ColumnRequest) (*dto.Column, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.ColumnRequest) *dto.Column); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Column) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.ColumnRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_CreateColumn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateColumn' +type MockBoards_CreateColumn_Call struct { + *mock.Call +} + +// CreateColumn is a helper method to define mock.On call +// - ctx context.Context +// - body dto.ColumnRequest +func (_e *MockBoards_Expecter) CreateColumn(ctx interface{}, body interface{}) *MockBoards_CreateColumn_Call { + return &MockBoards_CreateColumn_Call{Call: _e.mock.On("CreateColumn", ctx, body)} +} + +func (_c *MockBoards_CreateColumn_Call) Run(run func(ctx context.Context, body dto.ColumnRequest)) *MockBoards_CreateColumn_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.ColumnRequest)) + }) + return _c +} + +func (_c *MockBoards_CreateColumn_Call) Return(_a0 *dto.Column, _a1 error) *MockBoards_CreateColumn_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_CreateColumn_Call) RunAndReturn(run func(context.Context, dto.ColumnRequest) (*dto.Column, error)) *MockBoards_CreateColumn_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function with given fields: ctx, id +func (_m *MockBoards) Delete(ctx context.Context, id uuid.UUID) error { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) error); ok { + r0 = rf(ctx, id) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockBoards_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type MockBoards_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockBoards_Expecter) Delete(ctx interface{}, id interface{}) *MockBoards_Delete_Call { + return &MockBoards_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} +} + +func (_c *MockBoards_Delete_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockBoards_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_Delete_Call) Return(_a0 error) *MockBoards_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBoards_Delete_Call) RunAndReturn(run func(context.Context, uuid.UUID) error) *MockBoards_Delete_Call { + _c.Call.Return(run) + return _c +} + +// DeleteColumn provides a mock function with given fields: ctx, board, column, user +func (_m *MockBoards) DeleteColumn(ctx context.Context, board uuid.UUID, column uuid.UUID, user uuid.UUID) error { + ret := _m.Called(ctx, board, column, user) + + if len(ret) == 0 { + panic("no return value specified for DeleteColumn") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID) error); ok { + r0 = rf(ctx, board, column, user) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockBoards_DeleteColumn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteColumn' +type MockBoards_DeleteColumn_Call struct { + *mock.Call +} + +// DeleteColumn is a helper method to define mock.On call +// - ctx context.Context +// - board uuid.UUID +// - column uuid.UUID +// - user uuid.UUID +func (_e *MockBoards_Expecter) DeleteColumn(ctx interface{}, board interface{}, column interface{}, user interface{}) *MockBoards_DeleteColumn_Call { + return &MockBoards_DeleteColumn_Call{Call: _e.mock.On("DeleteColumn", ctx, board, column, user)} +} + +func (_c *MockBoards_DeleteColumn_Call) Run(run func(ctx context.Context, board uuid.UUID, column uuid.UUID, user uuid.UUID)) *MockBoards_DeleteColumn_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID), args[3].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_DeleteColumn_Call) Return(_a0 error) *MockBoards_DeleteColumn_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockBoards_DeleteColumn_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID) error) *MockBoards_DeleteColumn_Call { + _c.Call.Return(run) + return _c +} + +// DeleteTimer provides a mock function with given fields: ctx, id +func (_m *MockBoards) DeleteTimer(ctx context.Context, id uuid.UUID) (*dto.Board, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for DeleteTimer") + } + + var r0 *dto.Board + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*dto.Board, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *dto.Board); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Board) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_DeleteTimer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteTimer' +type MockBoards_DeleteTimer_Call struct { + *mock.Call +} + +// DeleteTimer is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockBoards_Expecter) DeleteTimer(ctx interface{}, id interface{}) *MockBoards_DeleteTimer_Call { + return &MockBoards_DeleteTimer_Call{Call: _e.mock.On("DeleteTimer", ctx, id)} +} + +func (_c *MockBoards_DeleteTimer_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockBoards_DeleteTimer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_DeleteTimer_Call) Return(_a0 *dto.Board, _a1 error) *MockBoards_DeleteTimer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_DeleteTimer_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*dto.Board, error)) *MockBoards_DeleteTimer_Call { + _c.Call.Return(run) + return _c +} + +// FullBoard provides a mock function with given fields: ctx, boardID +func (_m *MockBoards) FullBoard(ctx context.Context, boardID uuid.UUID) (*dto.FullBoard, error) { + ret := _m.Called(ctx, boardID) + + if len(ret) == 0 { + panic("no return value specified for FullBoard") + } + + var r0 *dto.FullBoard + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*dto.FullBoard, error)); ok { + return rf(ctx, boardID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *dto.FullBoard); ok { + r0 = rf(ctx, boardID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.FullBoard) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, boardID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_FullBoard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FullBoard' +type MockBoards_FullBoard_Call struct { + *mock.Call +} + +// FullBoard is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +func (_e *MockBoards_Expecter) FullBoard(ctx interface{}, boardID interface{}) *MockBoards_FullBoard_Call { + return &MockBoards_FullBoard_Call{Call: _e.mock.On("FullBoard", ctx, boardID)} +} + +func (_c *MockBoards_FullBoard_Call) Run(run func(ctx context.Context, boardID uuid.UUID)) *MockBoards_FullBoard_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_FullBoard_Call) Return(_a0 *dto.FullBoard, _a1 error) *MockBoards_FullBoard_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_FullBoard_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*dto.FullBoard, error)) *MockBoards_FullBoard_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, id +func (_m *MockBoards) Get(ctx context.Context, id uuid.UUID) (*dto.Board, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *dto.Board + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*dto.Board, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *dto.Board); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Board) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockBoards_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockBoards_Expecter) Get(ctx interface{}, id interface{}) *MockBoards_Get_Call { + return &MockBoards_Get_Call{Call: _e.mock.On("Get", ctx, id)} +} + +func (_c *MockBoards_Get_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockBoards_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_Get_Call) Return(_a0 *dto.Board, _a1 error) *MockBoards_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*dto.Board, error)) *MockBoards_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetBoards provides a mock function with given fields: ctx, userID +func (_m *MockBoards) GetBoards(ctx context.Context, userID uuid.UUID) ([]uuid.UUID, error) { + ret := _m.Called(ctx, userID) + + if len(ret) == 0 { + panic("no return value specified for GetBoards") + } + + var r0 []uuid.UUID + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) ([]uuid.UUID, error)); ok { + return rf(ctx, userID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) []uuid.UUID); ok { + r0 = rf(ctx, userID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]uuid.UUID) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, userID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_GetBoards_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetBoards' +type MockBoards_GetBoards_Call struct { + *mock.Call +} + +// GetBoards is a helper method to define mock.On call +// - ctx context.Context +// - userID uuid.UUID +func (_e *MockBoards_Expecter) GetBoards(ctx interface{}, userID interface{}) *MockBoards_GetBoards_Call { + return &MockBoards_GetBoards_Call{Call: _e.mock.On("GetBoards", ctx, userID)} +} + +func (_c *MockBoards_GetBoards_Call) Run(run func(ctx context.Context, userID uuid.UUID)) *MockBoards_GetBoards_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_GetBoards_Call) Return(_a0 []uuid.UUID, _a1 error) *MockBoards_GetBoards_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_GetBoards_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]uuid.UUID, error)) *MockBoards_GetBoards_Call { + _c.Call.Return(run) + return _c +} + +// GetColumn provides a mock function with given fields: ctx, boardID, columnID +func (_m *MockBoards) GetColumn(ctx context.Context, boardID uuid.UUID, columnID uuid.UUID) (*dto.Column, error) { + ret := _m.Called(ctx, boardID, columnID) + + if len(ret) == 0 { + panic("no return value specified for GetColumn") + } + + var r0 *dto.Column + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (*dto.Column, error)); ok { + return rf(ctx, boardID, columnID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) *dto.Column); ok { + r0 = rf(ctx, boardID, columnID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Column) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, boardID, columnID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_GetColumn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetColumn' +type MockBoards_GetColumn_Call struct { + *mock.Call +} + +// GetColumn is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +// - columnID uuid.UUID +func (_e *MockBoards_Expecter) GetColumn(ctx interface{}, boardID interface{}, columnID interface{}) *MockBoards_GetColumn_Call { + return &MockBoards_GetColumn_Call{Call: _e.mock.On("GetColumn", ctx, boardID, columnID)} +} + +func (_c *MockBoards_GetColumn_Call) Run(run func(ctx context.Context, boardID uuid.UUID, columnID uuid.UUID)) *MockBoards_GetColumn_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_GetColumn_Call) Return(_a0 *dto.Column, _a1 error) *MockBoards_GetColumn_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_GetColumn_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (*dto.Column, error)) *MockBoards_GetColumn_Call { + _c.Call.Return(run) + return _c +} + +// IncrementTimer provides a mock function with given fields: ctx, id +func (_m *MockBoards) IncrementTimer(ctx context.Context, id uuid.UUID) (*dto.Board, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for IncrementTimer") + } + + var r0 *dto.Board + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*dto.Board, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *dto.Board); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Board) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_IncrementTimer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IncrementTimer' +type MockBoards_IncrementTimer_Call struct { + *mock.Call +} + +// IncrementTimer is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockBoards_Expecter) IncrementTimer(ctx interface{}, id interface{}) *MockBoards_IncrementTimer_Call { + return &MockBoards_IncrementTimer_Call{Call: _e.mock.On("IncrementTimer", ctx, id)} +} + +func (_c *MockBoards_IncrementTimer_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockBoards_IncrementTimer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_IncrementTimer_Call) Return(_a0 *dto.Board, _a1 error) *MockBoards_IncrementTimer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_IncrementTimer_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*dto.Board, error)) *MockBoards_IncrementTimer_Call { + _c.Call.Return(run) + return _c +} + +// ListColumns provides a mock function with given fields: ctx, boardID +func (_m *MockBoards) ListColumns(ctx context.Context, boardID uuid.UUID) ([]*dto.Column, error) { + ret := _m.Called(ctx, boardID) + + if len(ret) == 0 { + panic("no return value specified for ListColumns") + } + + var r0 []*dto.Column + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) ([]*dto.Column, error)); ok { + return rf(ctx, boardID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) []*dto.Column); ok { + r0 = rf(ctx, boardID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.Column) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, boardID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_ListColumns_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListColumns' +type MockBoards_ListColumns_Call struct { + *mock.Call +} + +// ListColumns is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +func (_e *MockBoards_Expecter) ListColumns(ctx interface{}, boardID interface{}) *MockBoards_ListColumns_Call { + return &MockBoards_ListColumns_Call{Call: _e.mock.On("ListColumns", ctx, boardID)} +} + +func (_c *MockBoards_ListColumns_Call) Run(run func(ctx context.Context, boardID uuid.UUID)) *MockBoards_ListColumns_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockBoards_ListColumns_Call) Return(_a0 []*dto.Column, _a1 error) *MockBoards_ListColumns_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_ListColumns_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]*dto.Column, error)) *MockBoards_ListColumns_Call { + _c.Call.Return(run) + return _c +} + +// SetTimer provides a mock function with given fields: ctx, id, minutes +func (_m *MockBoards) SetTimer(ctx context.Context, id uuid.UUID, minutes uint8) (*dto.Board, error) { + ret := _m.Called(ctx, id, minutes) + + if len(ret) == 0 { + panic("no return value specified for SetTimer") + } + + var r0 *dto.Board + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uint8) (*dto.Board, error)); ok { + return rf(ctx, id, minutes) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uint8) *dto.Board); ok { + r0 = rf(ctx, id, minutes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Board) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uint8) error); ok { + r1 = rf(ctx, id, minutes) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_SetTimer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTimer' +type MockBoards_SetTimer_Call struct { + *mock.Call +} + +// SetTimer is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +// - minutes uint8 +func (_e *MockBoards_Expecter) SetTimer(ctx interface{}, id interface{}, minutes interface{}) *MockBoards_SetTimer_Call { + return &MockBoards_SetTimer_Call{Call: _e.mock.On("SetTimer", ctx, id, minutes)} +} + +func (_c *MockBoards_SetTimer_Call) Run(run func(ctx context.Context, id uuid.UUID, minutes uint8)) *MockBoards_SetTimer_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uint8)) + }) + return _c +} + +func (_c *MockBoards_SetTimer_Call) Return(_a0 *dto.Board, _a1 error) *MockBoards_SetTimer_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_SetTimer_Call) RunAndReturn(run func(context.Context, uuid.UUID, uint8) (*dto.Board, error)) *MockBoards_SetTimer_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, body +func (_m *MockBoards) Update(ctx context.Context, body dto.BoardUpdateRequest) (*dto.Board, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *dto.Board + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardUpdateRequest) (*dto.Board, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.BoardUpdateRequest) *dto.Board); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Board) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.BoardUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockBoards_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - body dto.BoardUpdateRequest +func (_e *MockBoards_Expecter) Update(ctx interface{}, body interface{}) *MockBoards_Update_Call { + return &MockBoards_Update_Call{Call: _e.mock.On("Update", ctx, body)} +} + +func (_c *MockBoards_Update_Call) Run(run func(ctx context.Context, body dto.BoardUpdateRequest)) *MockBoards_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.BoardUpdateRequest)) + }) + return _c +} + +func (_c *MockBoards_Update_Call) Return(_a0 *dto.Board, _a1 error) *MockBoards_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_Update_Call) RunAndReturn(run func(context.Context, dto.BoardUpdateRequest) (*dto.Board, error)) *MockBoards_Update_Call { + _c.Call.Return(run) + return _c +} + +// UpdateColumn provides a mock function with given fields: ctx, body +func (_m *MockBoards) UpdateColumn(ctx context.Context, body dto.ColumnUpdateRequest) (*dto.Column, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for UpdateColumn") + } + + var r0 *dto.Column + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.ColumnUpdateRequest) (*dto.Column, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.ColumnUpdateRequest) *dto.Column); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Column) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.ColumnUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockBoards_UpdateColumn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateColumn' +type MockBoards_UpdateColumn_Call struct { + *mock.Call +} + +// UpdateColumn is a helper method to define mock.On call +// - ctx context.Context +// - body dto.ColumnUpdateRequest +func (_e *MockBoards_Expecter) UpdateColumn(ctx interface{}, body interface{}) *MockBoards_UpdateColumn_Call { + return &MockBoards_UpdateColumn_Call{Call: _e.mock.On("UpdateColumn", ctx, body)} +} + +func (_c *MockBoards_UpdateColumn_Call) Run(run func(ctx context.Context, body dto.ColumnUpdateRequest)) *MockBoards_UpdateColumn_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.ColumnUpdateRequest)) + }) + return _c +} + +func (_c *MockBoards_UpdateColumn_Call) Return(_a0 *dto.Column, _a1 error) *MockBoards_UpdateColumn_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockBoards_UpdateColumn_Call) RunAndReturn(run func(context.Context, dto.ColumnUpdateRequest) (*dto.Column, error)) *MockBoards_UpdateColumn_Call { + _c.Call.Return(run) + return _c +} + +// NewMockBoards creates a new instance of MockBoards. 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 NewMockBoards(t interface { + mock.TestingT + Cleanup(func()) +}) *MockBoards { + mock := &MockBoards{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_Feedback.go b/server/src/mocks/services/mock_Feedback.go new file mode 100644 index 0000000000..1af1cc0bde --- /dev/null +++ b/server/src/mocks/services/mock_Feedback.go @@ -0,0 +1,130 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// MockFeedback is an autogenerated mock type for the Feedback type +type MockFeedback struct { + mock.Mock +} + +type MockFeedback_Expecter struct { + mock *mock.Mock +} + +func (_m *MockFeedback) EXPECT() *MockFeedback_Expecter { + return &MockFeedback_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function with given fields: ctx, feedbackType, contact, text +func (_m *MockFeedback) Create(ctx context.Context, feedbackType string, contact string, text string) error { + ret := _m.Called(ctx, feedbackType, contact, text) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { + r0 = rf(ctx, feedbackType, contact, text) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockFeedback_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockFeedback_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - feedbackType string +// - contact string +// - text string +func (_e *MockFeedback_Expecter) Create(ctx interface{}, feedbackType interface{}, contact interface{}, text interface{}) *MockFeedback_Create_Call { + return &MockFeedback_Create_Call{Call: _e.mock.On("Create", ctx, feedbackType, contact, text)} +} + +func (_c *MockFeedback_Create_Call) Run(run func(ctx context.Context, feedbackType string, contact string, text string)) *MockFeedback_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *MockFeedback_Create_Call) Return(_a0 error) *MockFeedback_Create_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockFeedback_Create_Call) RunAndReturn(run func(context.Context, string, string, string) error) *MockFeedback_Create_Call { + _c.Call.Return(run) + return _c +} + +// Enabled provides a mock function with no fields +func (_m *MockFeedback) Enabled() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Enabled") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockFeedback_Enabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Enabled' +type MockFeedback_Enabled_Call struct { + *mock.Call +} + +// Enabled is a helper method to define mock.On call +func (_e *MockFeedback_Expecter) Enabled() *MockFeedback_Enabled_Call { + return &MockFeedback_Enabled_Call{Call: _e.mock.On("Enabled")} +} + +func (_c *MockFeedback_Enabled_Call) Run(run func()) *MockFeedback_Enabled_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockFeedback_Enabled_Call) Return(_a0 bool) *MockFeedback_Enabled_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockFeedback_Enabled_Call) RunAndReturn(run func() bool) *MockFeedback_Enabled_Call { + _c.Call.Return(run) + return _c +} + +// NewMockFeedback creates a new instance of MockFeedback. 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 NewMockFeedback(t interface { + mock.TestingT + Cleanup(func()) +}) *MockFeedback { + mock := &MockFeedback{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_Health.go b/server/src/mocks/services/mock_Health.go new file mode 100644 index 0000000000..8f4882aa7b --- /dev/null +++ b/server/src/mocks/services/mock_Health.go @@ -0,0 +1,122 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import mock "github.com/stretchr/testify/mock" + +// MockHealth is an autogenerated mock type for the Health type +type MockHealth struct { + mock.Mock +} + +type MockHealth_Expecter struct { + mock *mock.Mock +} + +func (_m *MockHealth) EXPECT() *MockHealth_Expecter { + return &MockHealth_Expecter{mock: &_m.Mock} +} + +// IsDatabaseHealthy provides a mock function with no fields +func (_m *MockHealth) IsDatabaseHealthy() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsDatabaseHealthy") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockHealth_IsDatabaseHealthy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsDatabaseHealthy' +type MockHealth_IsDatabaseHealthy_Call struct { + *mock.Call +} + +// IsDatabaseHealthy is a helper method to define mock.On call +func (_e *MockHealth_Expecter) IsDatabaseHealthy() *MockHealth_IsDatabaseHealthy_Call { + return &MockHealth_IsDatabaseHealthy_Call{Call: _e.mock.On("IsDatabaseHealthy")} +} + +func (_c *MockHealth_IsDatabaseHealthy_Call) Run(run func()) *MockHealth_IsDatabaseHealthy_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockHealth_IsDatabaseHealthy_Call) Return(_a0 bool) *MockHealth_IsDatabaseHealthy_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockHealth_IsDatabaseHealthy_Call) RunAndReturn(run func() bool) *MockHealth_IsDatabaseHealthy_Call { + _c.Call.Return(run) + return _c +} + +// IsRealtimeHealthy provides a mock function with no fields +func (_m *MockHealth) IsRealtimeHealthy() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsRealtimeHealthy") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// MockHealth_IsRealtimeHealthy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsRealtimeHealthy' +type MockHealth_IsRealtimeHealthy_Call struct { + *mock.Call +} + +// IsRealtimeHealthy is a helper method to define mock.On call +func (_e *MockHealth_Expecter) IsRealtimeHealthy() *MockHealth_IsRealtimeHealthy_Call { + return &MockHealth_IsRealtimeHealthy_Call{Call: _e.mock.On("IsRealtimeHealthy")} +} + +func (_c *MockHealth_IsRealtimeHealthy_Call) Run(run func()) *MockHealth_IsRealtimeHealthy_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *MockHealth_IsRealtimeHealthy_Call) Return(_a0 bool) *MockHealth_IsRealtimeHealthy_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockHealth_IsRealtimeHealthy_Call) RunAndReturn(run func() bool) *MockHealth_IsRealtimeHealthy_Call { + _c.Call.Return(run) + return _c +} + +// NewMockHealth creates a new instance of MockHealth. 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 NewMockHealth(t interface { + mock.TestingT + Cleanup(func()) +}) *MockHealth { + mock := &MockHealth{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_Notes.go b/server/src/mocks/services/mock_Notes.go new file mode 100644 index 0000000000..66024de389 --- /dev/null +++ b/server/src/mocks/services/mock_Notes.go @@ -0,0 +1,382 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + dto "scrumlr.io/server/common/dto" + + uuid "github.com/google/uuid" +) + +// MockNotes is an autogenerated mock type for the Notes type +type MockNotes struct { + mock.Mock +} + +type MockNotes_Expecter struct { + mock *mock.Mock +} + +func (_m *MockNotes) EXPECT() *MockNotes_Expecter { + return &MockNotes_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function with given fields: ctx, body +func (_m *MockNotes) Create(ctx context.Context, body dto.NoteCreateRequest) (*dto.Note, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *dto.Note + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.NoteCreateRequest) (*dto.Note, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.NoteCreateRequest) *dto.Note); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Note) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.NoteCreateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNotes_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockNotes_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - body dto.NoteCreateRequest +func (_e *MockNotes_Expecter) Create(ctx interface{}, body interface{}) *MockNotes_Create_Call { + return &MockNotes_Create_Call{Call: _e.mock.On("Create", ctx, body)} +} + +func (_c *MockNotes_Create_Call) Run(run func(ctx context.Context, body dto.NoteCreateRequest)) *MockNotes_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.NoteCreateRequest)) + }) + return _c +} + +func (_c *MockNotes_Create_Call) Return(_a0 *dto.Note, _a1 error) *MockNotes_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNotes_Create_Call) RunAndReturn(run func(context.Context, dto.NoteCreateRequest) (*dto.Note, error)) *MockNotes_Create_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function with given fields: ctx, body, id +func (_m *MockNotes) Delete(ctx context.Context, body dto.NoteDeleteRequest, id uuid.UUID) error { + ret := _m.Called(ctx, body, id) + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, dto.NoteDeleteRequest, uuid.UUID) error); ok { + r0 = rf(ctx, body, id) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockNotes_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type MockNotes_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - body dto.NoteDeleteRequest +// - id uuid.UUID +func (_e *MockNotes_Expecter) Delete(ctx interface{}, body interface{}, id interface{}) *MockNotes_Delete_Call { + return &MockNotes_Delete_Call{Call: _e.mock.On("Delete", ctx, body, id)} +} + +func (_c *MockNotes_Delete_Call) Run(run func(ctx context.Context, body dto.NoteDeleteRequest, id uuid.UUID)) *MockNotes_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.NoteDeleteRequest), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockNotes_Delete_Call) Return(_a0 error) *MockNotes_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockNotes_Delete_Call) RunAndReturn(run func(context.Context, dto.NoteDeleteRequest, uuid.UUID) error) *MockNotes_Delete_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, id +func (_m *MockNotes) Get(ctx context.Context, id uuid.UUID) (*dto.Note, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *dto.Note + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*dto.Note, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *dto.Note); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Note) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNotes_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockNotes_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockNotes_Expecter) Get(ctx interface{}, id interface{}) *MockNotes_Get_Call { + return &MockNotes_Get_Call{Call: _e.mock.On("Get", ctx, id)} +} + +func (_c *MockNotes_Get_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockNotes_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockNotes_Get_Call) Return(_a0 *dto.Note, _a1 error) *MockNotes_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNotes_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*dto.Note, error)) *MockNotes_Get_Call { + _c.Call.Return(run) + return _c +} + +// Import provides a mock function with given fields: ctx, body +func (_m *MockNotes) Import(ctx context.Context, body dto.NoteImportRequest) (*dto.Note, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Import") + } + + var r0 *dto.Note + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.NoteImportRequest) (*dto.Note, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.NoteImportRequest) *dto.Note); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Note) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.NoteImportRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNotes_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' +type MockNotes_Import_Call struct { + *mock.Call +} + +// Import is a helper method to define mock.On call +// - ctx context.Context +// - body dto.NoteImportRequest +func (_e *MockNotes_Expecter) Import(ctx interface{}, body interface{}) *MockNotes_Import_Call { + return &MockNotes_Import_Call{Call: _e.mock.On("Import", ctx, body)} +} + +func (_c *MockNotes_Import_Call) Run(run func(ctx context.Context, body dto.NoteImportRequest)) *MockNotes_Import_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.NoteImportRequest)) + }) + return _c +} + +func (_c *MockNotes_Import_Call) Return(_a0 *dto.Note, _a1 error) *MockNotes_Import_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNotes_Import_Call) RunAndReturn(run func(context.Context, dto.NoteImportRequest) (*dto.Note, error)) *MockNotes_Import_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function with given fields: ctx, id +func (_m *MockNotes) List(ctx context.Context, id uuid.UUID) ([]*dto.Note, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 []*dto.Note + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) ([]*dto.Note, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) []*dto.Note); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.Note) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNotes_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type MockNotes_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockNotes_Expecter) List(ctx interface{}, id interface{}) *MockNotes_List_Call { + return &MockNotes_List_Call{Call: _e.mock.On("List", ctx, id)} +} + +func (_c *MockNotes_List_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockNotes_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockNotes_List_Call) Return(_a0 []*dto.Note, _a1 error) *MockNotes_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNotes_List_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]*dto.Note, error)) *MockNotes_List_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, body +func (_m *MockNotes) Update(ctx context.Context, body dto.NoteUpdateRequest) (*dto.Note, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *dto.Note + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.NoteUpdateRequest) (*dto.Note, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.NoteUpdateRequest) *dto.Note); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Note) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.NoteUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockNotes_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockNotes_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - body dto.NoteUpdateRequest +func (_e *MockNotes_Expecter) Update(ctx interface{}, body interface{}) *MockNotes_Update_Call { + return &MockNotes_Update_Call{Call: _e.mock.On("Update", ctx, body)} +} + +func (_c *MockNotes_Update_Call) Run(run func(ctx context.Context, body dto.NoteUpdateRequest)) *MockNotes_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.NoteUpdateRequest)) + }) + return _c +} + +func (_c *MockNotes_Update_Call) Return(_a0 *dto.Note, _a1 error) *MockNotes_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockNotes_Update_Call) RunAndReturn(run func(context.Context, dto.NoteUpdateRequest) (*dto.Note, error)) *MockNotes_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewMockNotes creates a new instance of MockNotes. 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 NewMockNotes(t interface { + mock.TestingT + Cleanup(func()) +}) *MockNotes { + mock := &MockNotes{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_Reactions.go b/server/src/mocks/services/mock_Reactions.go new file mode 100644 index 0000000000..d798028a82 --- /dev/null +++ b/server/src/mocks/services/mock_Reactions.go @@ -0,0 +1,328 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + dto "scrumlr.io/server/common/dto" + + uuid "github.com/google/uuid" +) + +// MockReactions is an autogenerated mock type for the Reactions type +type MockReactions struct { + mock.Mock +} + +type MockReactions_Expecter struct { + mock *mock.Mock +} + +func (_m *MockReactions) EXPECT() *MockReactions_Expecter { + return &MockReactions_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function with given fields: ctx, board, body +func (_m *MockReactions) Create(ctx context.Context, board uuid.UUID, body dto.ReactionCreateRequest) (*dto.Reaction, error) { + ret := _m.Called(ctx, board, body) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *dto.Reaction + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, dto.ReactionCreateRequest) (*dto.Reaction, error)); ok { + return rf(ctx, board, body) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, dto.ReactionCreateRequest) *dto.Reaction); ok { + r0 = rf(ctx, board, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Reaction) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, dto.ReactionCreateRequest) error); ok { + r1 = rf(ctx, board, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockReactions_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockReactions_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - board uuid.UUID +// - body dto.ReactionCreateRequest +func (_e *MockReactions_Expecter) Create(ctx interface{}, board interface{}, body interface{}) *MockReactions_Create_Call { + return &MockReactions_Create_Call{Call: _e.mock.On("Create", ctx, board, body)} +} + +func (_c *MockReactions_Create_Call) Run(run func(ctx context.Context, board uuid.UUID, body dto.ReactionCreateRequest)) *MockReactions_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(dto.ReactionCreateRequest)) + }) + return _c +} + +func (_c *MockReactions_Create_Call) Return(_a0 *dto.Reaction, _a1 error) *MockReactions_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockReactions_Create_Call) RunAndReturn(run func(context.Context, uuid.UUID, dto.ReactionCreateRequest) (*dto.Reaction, error)) *MockReactions_Create_Call { + _c.Call.Return(run) + return _c +} + +// Delete provides a mock function with given fields: ctx, board, user, id +func (_m *MockReactions) Delete(ctx context.Context, board uuid.UUID, user uuid.UUID, id uuid.UUID) error { + ret := _m.Called(ctx, board, user, id) + + if len(ret) == 0 { + panic("no return value specified for Delete") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID) error); ok { + r0 = rf(ctx, board, user, id) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockReactions_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' +type MockReactions_Delete_Call struct { + *mock.Call +} + +// Delete is a helper method to define mock.On call +// - ctx context.Context +// - board uuid.UUID +// - user uuid.UUID +// - id uuid.UUID +func (_e *MockReactions_Expecter) Delete(ctx interface{}, board interface{}, user interface{}, id interface{}) *MockReactions_Delete_Call { + return &MockReactions_Delete_Call{Call: _e.mock.On("Delete", ctx, board, user, id)} +} + +func (_c *MockReactions_Delete_Call) Run(run func(ctx context.Context, board uuid.UUID, user uuid.UUID, id uuid.UUID)) *MockReactions_Delete_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID), args[3].(uuid.UUID)) + }) + return _c +} + +func (_c *MockReactions_Delete_Call) Return(_a0 error) *MockReactions_Delete_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockReactions_Delete_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID) error) *MockReactions_Delete_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, id +func (_m *MockReactions) Get(ctx context.Context, id uuid.UUID) (*dto.Reaction, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *dto.Reaction + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*dto.Reaction, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *dto.Reaction); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Reaction) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockReactions_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockReactions_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockReactions_Expecter) Get(ctx interface{}, id interface{}) *MockReactions_Get_Call { + return &MockReactions_Get_Call{Call: _e.mock.On("Get", ctx, id)} +} + +func (_c *MockReactions_Get_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockReactions_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockReactions_Get_Call) Return(_a0 *dto.Reaction, _a1 error) *MockReactions_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockReactions_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*dto.Reaction, error)) *MockReactions_Get_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function with given fields: ctx, boardID +func (_m *MockReactions) List(ctx context.Context, boardID uuid.UUID) ([]*dto.Reaction, error) { + ret := _m.Called(ctx, boardID) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 []*dto.Reaction + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) ([]*dto.Reaction, error)); ok { + return rf(ctx, boardID) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) []*dto.Reaction); ok { + r0 = rf(ctx, boardID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.Reaction) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, boardID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockReactions_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type MockReactions_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - boardID uuid.UUID +func (_e *MockReactions_Expecter) List(ctx interface{}, boardID interface{}) *MockReactions_List_Call { + return &MockReactions_List_Call{Call: _e.mock.On("List", ctx, boardID)} +} + +func (_c *MockReactions_List_Call) Run(run func(ctx context.Context, boardID uuid.UUID)) *MockReactions_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockReactions_List_Call) Return(_a0 []*dto.Reaction, _a1 error) *MockReactions_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockReactions_List_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]*dto.Reaction, error)) *MockReactions_List_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, board, user, id, body +func (_m *MockReactions) Update(ctx context.Context, board uuid.UUID, user uuid.UUID, id uuid.UUID, body dto.ReactionUpdateTypeRequest) (*dto.Reaction, error) { + ret := _m.Called(ctx, board, user, id, body) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *dto.Reaction + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID, dto.ReactionUpdateTypeRequest) (*dto.Reaction, error)); ok { + return rf(ctx, board, user, id, body) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID, dto.ReactionUpdateTypeRequest) *dto.Reaction); ok { + r0 = rf(ctx, board, user, id, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Reaction) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID, dto.ReactionUpdateTypeRequest) error); ok { + r1 = rf(ctx, board, user, id, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockReactions_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockReactions_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - board uuid.UUID +// - user uuid.UUID +// - id uuid.UUID +// - body dto.ReactionUpdateTypeRequest +func (_e *MockReactions_Expecter) Update(ctx interface{}, board interface{}, user interface{}, id interface{}, body interface{}) *MockReactions_Update_Call { + return &MockReactions_Update_Call{Call: _e.mock.On("Update", ctx, board, user, id, body)} +} + +func (_c *MockReactions_Update_Call) Run(run func(ctx context.Context, board uuid.UUID, user uuid.UUID, id uuid.UUID, body dto.ReactionUpdateTypeRequest)) *MockReactions_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID), args[3].(uuid.UUID), args[4].(dto.ReactionUpdateTypeRequest)) + }) + return _c +} + +func (_c *MockReactions_Update_Call) Return(_a0 *dto.Reaction, _a1 error) *MockReactions_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockReactions_Update_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID, uuid.UUID, dto.ReactionUpdateTypeRequest) (*dto.Reaction, error)) *MockReactions_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewMockReactions creates a new instance of MockReactions. 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 NewMockReactions(t interface { + mock.TestingT + Cleanup(func()) +}) *MockReactions { + mock := &MockReactions{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_Users.go b/server/src/mocks/services/mock_Users.go new file mode 100644 index 0000000000..e5e9855981 --- /dev/null +++ b/server/src/mocks/services/mock_Users.go @@ -0,0 +1,582 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + dto "scrumlr.io/server/common/dto" + + uuid "github.com/google/uuid" +) + +// MockUsers is an autogenerated mock type for the Users type +type MockUsers struct { + mock.Mock +} + +type MockUsers_Expecter struct { + mock *mock.Mock +} + +func (_m *MockUsers) EXPECT() *MockUsers_Expecter { + return &MockUsers_Expecter{mock: &_m.Mock} +} + +// CreateAppleUser provides a mock function with given fields: ctx, id, name, avatarUrl +func (_m *MockUsers) CreateAppleUser(ctx context.Context, id string, name string, avatarUrl string) (*dto.User, error) { + ret := _m.Called(ctx, id, name, avatarUrl) + + if len(ret) == 0 { + panic("no return value specified for CreateAppleUser") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dto.User, error)); ok { + return rf(ctx, id, name, avatarUrl) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dto.User); ok { + r0 = rf(ctx, id, name, avatarUrl) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, id, name, avatarUrl) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_CreateAppleUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAppleUser' +type MockUsers_CreateAppleUser_Call struct { + *mock.Call +} + +// CreateAppleUser is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - name string +// - avatarUrl string +func (_e *MockUsers_Expecter) CreateAppleUser(ctx interface{}, id interface{}, name interface{}, avatarUrl interface{}) *MockUsers_CreateAppleUser_Call { + return &MockUsers_CreateAppleUser_Call{Call: _e.mock.On("CreateAppleUser", ctx, id, name, avatarUrl)} +} + +func (_c *MockUsers_CreateAppleUser_Call) Run(run func(ctx context.Context, id string, name string, avatarUrl string)) *MockUsers_CreateAppleUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *MockUsers_CreateAppleUser_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_CreateAppleUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_CreateAppleUser_Call) RunAndReturn(run func(context.Context, string, string, string) (*dto.User, error)) *MockUsers_CreateAppleUser_Call { + _c.Call.Return(run) + return _c +} + +// CreateAzureAdUser provides a mock function with given fields: ctx, id, name, avatarUrl +func (_m *MockUsers) CreateAzureAdUser(ctx context.Context, id string, name string, avatarUrl string) (*dto.User, error) { + ret := _m.Called(ctx, id, name, avatarUrl) + + if len(ret) == 0 { + panic("no return value specified for CreateAzureAdUser") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dto.User, error)); ok { + return rf(ctx, id, name, avatarUrl) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dto.User); ok { + r0 = rf(ctx, id, name, avatarUrl) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, id, name, avatarUrl) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_CreateAzureAdUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateAzureAdUser' +type MockUsers_CreateAzureAdUser_Call struct { + *mock.Call +} + +// CreateAzureAdUser is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - name string +// - avatarUrl string +func (_e *MockUsers_Expecter) CreateAzureAdUser(ctx interface{}, id interface{}, name interface{}, avatarUrl interface{}) *MockUsers_CreateAzureAdUser_Call { + return &MockUsers_CreateAzureAdUser_Call{Call: _e.mock.On("CreateAzureAdUser", ctx, id, name, avatarUrl)} +} + +func (_c *MockUsers_CreateAzureAdUser_Call) Run(run func(ctx context.Context, id string, name string, avatarUrl string)) *MockUsers_CreateAzureAdUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *MockUsers_CreateAzureAdUser_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_CreateAzureAdUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_CreateAzureAdUser_Call) RunAndReturn(run func(context.Context, string, string, string) (*dto.User, error)) *MockUsers_CreateAzureAdUser_Call { + _c.Call.Return(run) + return _c +} + +// CreateGitHubUser provides a mock function with given fields: ctx, id, name, avatarUrl +func (_m *MockUsers) CreateGitHubUser(ctx context.Context, id string, name string, avatarUrl string) (*dto.User, error) { + ret := _m.Called(ctx, id, name, avatarUrl) + + if len(ret) == 0 { + panic("no return value specified for CreateGitHubUser") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dto.User, error)); ok { + return rf(ctx, id, name, avatarUrl) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dto.User); ok { + r0 = rf(ctx, id, name, avatarUrl) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, id, name, avatarUrl) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_CreateGitHubUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateGitHubUser' +type MockUsers_CreateGitHubUser_Call struct { + *mock.Call +} + +// CreateGitHubUser is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - name string +// - avatarUrl string +func (_e *MockUsers_Expecter) CreateGitHubUser(ctx interface{}, id interface{}, name interface{}, avatarUrl interface{}) *MockUsers_CreateGitHubUser_Call { + return &MockUsers_CreateGitHubUser_Call{Call: _e.mock.On("CreateGitHubUser", ctx, id, name, avatarUrl)} +} + +func (_c *MockUsers_CreateGitHubUser_Call) Run(run func(ctx context.Context, id string, name string, avatarUrl string)) *MockUsers_CreateGitHubUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *MockUsers_CreateGitHubUser_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_CreateGitHubUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_CreateGitHubUser_Call) RunAndReturn(run func(context.Context, string, string, string) (*dto.User, error)) *MockUsers_CreateGitHubUser_Call { + _c.Call.Return(run) + return _c +} + +// CreateGoogleUser provides a mock function with given fields: ctx, id, name, avatarUrl +func (_m *MockUsers) CreateGoogleUser(ctx context.Context, id string, name string, avatarUrl string) (*dto.User, error) { + ret := _m.Called(ctx, id, name, avatarUrl) + + if len(ret) == 0 { + panic("no return value specified for CreateGoogleUser") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dto.User, error)); ok { + return rf(ctx, id, name, avatarUrl) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dto.User); ok { + r0 = rf(ctx, id, name, avatarUrl) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, id, name, avatarUrl) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_CreateGoogleUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateGoogleUser' +type MockUsers_CreateGoogleUser_Call struct { + *mock.Call +} + +// CreateGoogleUser is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - name string +// - avatarUrl string +func (_e *MockUsers_Expecter) CreateGoogleUser(ctx interface{}, id interface{}, name interface{}, avatarUrl interface{}) *MockUsers_CreateGoogleUser_Call { + return &MockUsers_CreateGoogleUser_Call{Call: _e.mock.On("CreateGoogleUser", ctx, id, name, avatarUrl)} +} + +func (_c *MockUsers_CreateGoogleUser_Call) Run(run func(ctx context.Context, id string, name string, avatarUrl string)) *MockUsers_CreateGoogleUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *MockUsers_CreateGoogleUser_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_CreateGoogleUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_CreateGoogleUser_Call) RunAndReturn(run func(context.Context, string, string, string) (*dto.User, error)) *MockUsers_CreateGoogleUser_Call { + _c.Call.Return(run) + return _c +} + +// CreateMicrosoftUser provides a mock function with given fields: ctx, id, name, avatarUrl +func (_m *MockUsers) CreateMicrosoftUser(ctx context.Context, id string, name string, avatarUrl string) (*dto.User, error) { + ret := _m.Called(ctx, id, name, avatarUrl) + + if len(ret) == 0 { + panic("no return value specified for CreateMicrosoftUser") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dto.User, error)); ok { + return rf(ctx, id, name, avatarUrl) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dto.User); ok { + r0 = rf(ctx, id, name, avatarUrl) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, id, name, avatarUrl) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_CreateMicrosoftUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateMicrosoftUser' +type MockUsers_CreateMicrosoftUser_Call struct { + *mock.Call +} + +// CreateMicrosoftUser is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - name string +// - avatarUrl string +func (_e *MockUsers_Expecter) CreateMicrosoftUser(ctx interface{}, id interface{}, name interface{}, avatarUrl interface{}) *MockUsers_CreateMicrosoftUser_Call { + return &MockUsers_CreateMicrosoftUser_Call{Call: _e.mock.On("CreateMicrosoftUser", ctx, id, name, avatarUrl)} +} + +func (_c *MockUsers_CreateMicrosoftUser_Call) Run(run func(ctx context.Context, id string, name string, avatarUrl string)) *MockUsers_CreateMicrosoftUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *MockUsers_CreateMicrosoftUser_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_CreateMicrosoftUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_CreateMicrosoftUser_Call) RunAndReturn(run func(context.Context, string, string, string) (*dto.User, error)) *MockUsers_CreateMicrosoftUser_Call { + _c.Call.Return(run) + return _c +} + +// CreateOIDCUser provides a mock function with given fields: ctx, id, name, avatarUrl +func (_m *MockUsers) CreateOIDCUser(ctx context.Context, id string, name string, avatarUrl string) (*dto.User, error) { + ret := _m.Called(ctx, id, name, avatarUrl) + + if len(ret) == 0 { + panic("no return value specified for CreateOIDCUser") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*dto.User, error)); ok { + return rf(ctx, id, name, avatarUrl) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *dto.User); ok { + r0 = rf(ctx, id, name, avatarUrl) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok { + r1 = rf(ctx, id, name, avatarUrl) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_CreateOIDCUser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateOIDCUser' +type MockUsers_CreateOIDCUser_Call struct { + *mock.Call +} + +// CreateOIDCUser is a helper method to define mock.On call +// - ctx context.Context +// - id string +// - name string +// - avatarUrl string +func (_e *MockUsers_Expecter) CreateOIDCUser(ctx interface{}, id interface{}, name interface{}, avatarUrl interface{}) *MockUsers_CreateOIDCUser_Call { + return &MockUsers_CreateOIDCUser_Call{Call: _e.mock.On("CreateOIDCUser", ctx, id, name, avatarUrl)} +} + +func (_c *MockUsers_CreateOIDCUser_Call) Run(run func(ctx context.Context, id string, name string, avatarUrl string)) *MockUsers_CreateOIDCUser_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string)) + }) + return _c +} + +func (_c *MockUsers_CreateOIDCUser_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_CreateOIDCUser_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_CreateOIDCUser_Call) RunAndReturn(run func(context.Context, string, string, string) (*dto.User, error)) *MockUsers_CreateOIDCUser_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, id +func (_m *MockUsers) Get(ctx context.Context, id uuid.UUID) (*dto.User, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) (*dto.User, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) *dto.User); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockUsers_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - id uuid.UUID +func (_e *MockUsers_Expecter) Get(ctx interface{}, id interface{}) *MockUsers_Get_Call { + return &MockUsers_Get_Call{Call: _e.mock.On("Get", ctx, id)} +} + +func (_c *MockUsers_Get_Call) Run(run func(ctx context.Context, id uuid.UUID)) *MockUsers_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockUsers_Get_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID) (*dto.User, error)) *MockUsers_Get_Call { + _c.Call.Return(run) + return _c +} + +// LoginAnonymous provides a mock function with given fields: ctx, name +func (_m *MockUsers) LoginAnonymous(ctx context.Context, name string) (*dto.User, error) { + ret := _m.Called(ctx, name) + + if len(ret) == 0 { + panic("no return value specified for LoginAnonymous") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*dto.User, error)); ok { + return rf(ctx, name) + } + if rf, ok := ret.Get(0).(func(context.Context, string) *dto.User); ok { + r0 = rf(ctx, name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, name) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_LoginAnonymous_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoginAnonymous' +type MockUsers_LoginAnonymous_Call struct { + *mock.Call +} + +// LoginAnonymous is a helper method to define mock.On call +// - ctx context.Context +// - name string +func (_e *MockUsers_Expecter) LoginAnonymous(ctx interface{}, name interface{}) *MockUsers_LoginAnonymous_Call { + return &MockUsers_LoginAnonymous_Call{Call: _e.mock.On("LoginAnonymous", ctx, name)} +} + +func (_c *MockUsers_LoginAnonymous_Call) Run(run func(ctx context.Context, name string)) *MockUsers_LoginAnonymous_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *MockUsers_LoginAnonymous_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_LoginAnonymous_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_LoginAnonymous_Call) RunAndReturn(run func(context.Context, string) (*dto.User, error)) *MockUsers_LoginAnonymous_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, body +func (_m *MockUsers) Update(ctx context.Context, body dto.UserUpdateRequest) (*dto.User, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *dto.User + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.UserUpdateRequest) (*dto.User, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.UserUpdateRequest) *dto.User); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.User) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.UserUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockUsers_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockUsers_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - body dto.UserUpdateRequest +func (_e *MockUsers_Expecter) Update(ctx interface{}, body interface{}) *MockUsers_Update_Call { + return &MockUsers_Update_Call{Call: _e.mock.On("Update", ctx, body)} +} + +func (_c *MockUsers_Update_Call) Run(run func(ctx context.Context, body dto.UserUpdateRequest)) *MockUsers_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.UserUpdateRequest)) + }) + return _c +} + +func (_c *MockUsers_Update_Call) Return(_a0 *dto.User, _a1 error) *MockUsers_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockUsers_Update_Call) RunAndReturn(run func(context.Context, dto.UserUpdateRequest) (*dto.User, error)) *MockUsers_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewMockUsers creates a new instance of MockUsers. 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 NewMockUsers(t interface { + mock.TestingT + Cleanup(func()) +}) *MockUsers { + mock := &MockUsers{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/server/src/mocks/services/mock_Votings.go b/server/src/mocks/services/mock_Votings.go new file mode 100644 index 0000000000..0d0a5d69be --- /dev/null +++ b/server/src/mocks/services/mock_Votings.go @@ -0,0 +1,443 @@ +// Code generated by mockery v2.51.0. DO NOT EDIT. + +package services + +import ( + context "context" + + dto "scrumlr.io/server/common/dto" + filter "scrumlr.io/server/common/filter" + + mock "github.com/stretchr/testify/mock" + + uuid "github.com/google/uuid" +) + +// MockVotings is an autogenerated mock type for the Votings type +type MockVotings struct { + mock.Mock +} + +type MockVotings_Expecter struct { + mock *mock.Mock +} + +func (_m *MockVotings) EXPECT() *MockVotings_Expecter { + return &MockVotings_Expecter{mock: &_m.Mock} +} + +// AddVote provides a mock function with given fields: ctx, req +func (_m *MockVotings) AddVote(ctx context.Context, req dto.VoteRequest) (*dto.Vote, error) { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for AddVote") + } + + var r0 *dto.Vote + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.VoteRequest) (*dto.Vote, error)); ok { + return rf(ctx, req) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.VoteRequest) *dto.Vote); ok { + r0 = rf(ctx, req) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Vote) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.VoteRequest) error); ok { + r1 = rf(ctx, req) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockVotings_AddVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddVote' +type MockVotings_AddVote_Call struct { + *mock.Call +} + +// AddVote is a helper method to define mock.On call +// - ctx context.Context +// - req dto.VoteRequest +func (_e *MockVotings_Expecter) AddVote(ctx interface{}, req interface{}) *MockVotings_AddVote_Call { + return &MockVotings_AddVote_Call{Call: _e.mock.On("AddVote", ctx, req)} +} + +func (_c *MockVotings_AddVote_Call) Run(run func(ctx context.Context, req dto.VoteRequest)) *MockVotings_AddVote_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.VoteRequest)) + }) + return _c +} + +func (_c *MockVotings_AddVote_Call) Return(_a0 *dto.Vote, _a1 error) *MockVotings_AddVote_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockVotings_AddVote_Call) RunAndReturn(run func(context.Context, dto.VoteRequest) (*dto.Vote, error)) *MockVotings_AddVote_Call { + _c.Call.Return(run) + return _c +} + +// Create provides a mock function with given fields: ctx, body +func (_m *MockVotings) Create(ctx context.Context, body dto.VotingCreateRequest) (*dto.Voting, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Create") + } + + var r0 *dto.Voting + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.VotingCreateRequest) (*dto.Voting, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.VotingCreateRequest) *dto.Voting); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Voting) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.VotingCreateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockVotings_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type MockVotings_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - body dto.VotingCreateRequest +func (_e *MockVotings_Expecter) Create(ctx interface{}, body interface{}) *MockVotings_Create_Call { + return &MockVotings_Create_Call{Call: _e.mock.On("Create", ctx, body)} +} + +func (_c *MockVotings_Create_Call) Run(run func(ctx context.Context, body dto.VotingCreateRequest)) *MockVotings_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.VotingCreateRequest)) + }) + return _c +} + +func (_c *MockVotings_Create_Call) Return(_a0 *dto.Voting, _a1 error) *MockVotings_Create_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockVotings_Create_Call) RunAndReturn(run func(context.Context, dto.VotingCreateRequest) (*dto.Voting, error)) *MockVotings_Create_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, board, id +func (_m *MockVotings) Get(ctx context.Context, board uuid.UUID, id uuid.UUID) (*dto.Voting, error) { + ret := _m.Called(ctx, board, id) + + if len(ret) == 0 { + panic("no return value specified for Get") + } + + var r0 *dto.Voting + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) (*dto.Voting, error)); ok { + return rf(ctx, board, id) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID, uuid.UUID) *dto.Voting); ok { + r0 = rf(ctx, board, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Voting) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID, uuid.UUID) error); ok { + r1 = rf(ctx, board, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockVotings_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type MockVotings_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - board uuid.UUID +// - id uuid.UUID +func (_e *MockVotings_Expecter) Get(ctx interface{}, board interface{}, id interface{}) *MockVotings_Get_Call { + return &MockVotings_Get_Call{Call: _e.mock.On("Get", ctx, board, id)} +} + +func (_c *MockVotings_Get_Call) Run(run func(ctx context.Context, board uuid.UUID, id uuid.UUID)) *MockVotings_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID), args[2].(uuid.UUID)) + }) + return _c +} + +func (_c *MockVotings_Get_Call) Return(_a0 *dto.Voting, _a1 error) *MockVotings_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockVotings_Get_Call) RunAndReturn(run func(context.Context, uuid.UUID, uuid.UUID) (*dto.Voting, error)) *MockVotings_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetVotes provides a mock function with given fields: ctx, f +func (_m *MockVotings) GetVotes(ctx context.Context, f filter.VoteFilter) ([]*dto.Vote, error) { + ret := _m.Called(ctx, f) + + if len(ret) == 0 { + panic("no return value specified for GetVotes") + } + + var r0 []*dto.Vote + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, filter.VoteFilter) ([]*dto.Vote, error)); ok { + return rf(ctx, f) + } + if rf, ok := ret.Get(0).(func(context.Context, filter.VoteFilter) []*dto.Vote); ok { + r0 = rf(ctx, f) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.Vote) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, filter.VoteFilter) error); ok { + r1 = rf(ctx, f) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockVotings_GetVotes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetVotes' +type MockVotings_GetVotes_Call struct { + *mock.Call +} + +// GetVotes is a helper method to define mock.On call +// - ctx context.Context +// - f filter.VoteFilter +func (_e *MockVotings_Expecter) GetVotes(ctx interface{}, f interface{}) *MockVotings_GetVotes_Call { + return &MockVotings_GetVotes_Call{Call: _e.mock.On("GetVotes", ctx, f)} +} + +func (_c *MockVotings_GetVotes_Call) Run(run func(ctx context.Context, f filter.VoteFilter)) *MockVotings_GetVotes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(filter.VoteFilter)) + }) + return _c +} + +func (_c *MockVotings_GetVotes_Call) Return(_a0 []*dto.Vote, _a1 error) *MockVotings_GetVotes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockVotings_GetVotes_Call) RunAndReturn(run func(context.Context, filter.VoteFilter) ([]*dto.Vote, error)) *MockVotings_GetVotes_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function with given fields: ctx, board +func (_m *MockVotings) List(ctx context.Context, board uuid.UUID) ([]*dto.Voting, error) { + ret := _m.Called(ctx, board) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 []*dto.Voting + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) ([]*dto.Voting, error)); ok { + return rf(ctx, board) + } + if rf, ok := ret.Get(0).(func(context.Context, uuid.UUID) []*dto.Voting); ok { + r0 = rf(ctx, board) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*dto.Voting) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, uuid.UUID) error); ok { + r1 = rf(ctx, board) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockVotings_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type MockVotings_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - board uuid.UUID +func (_e *MockVotings_Expecter) List(ctx interface{}, board interface{}) *MockVotings_List_Call { + return &MockVotings_List_Call{Call: _e.mock.On("List", ctx, board)} +} + +func (_c *MockVotings_List_Call) Run(run func(ctx context.Context, board uuid.UUID)) *MockVotings_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(uuid.UUID)) + }) + return _c +} + +func (_c *MockVotings_List_Call) Return(_a0 []*dto.Voting, _a1 error) *MockVotings_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockVotings_List_Call) RunAndReturn(run func(context.Context, uuid.UUID) ([]*dto.Voting, error)) *MockVotings_List_Call { + _c.Call.Return(run) + return _c +} + +// RemoveVote provides a mock function with given fields: ctx, req +func (_m *MockVotings) RemoveVote(ctx context.Context, req dto.VoteRequest) error { + ret := _m.Called(ctx, req) + + if len(ret) == 0 { + panic("no return value specified for RemoveVote") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, dto.VoteRequest) error); ok { + r0 = rf(ctx, req) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// MockVotings_RemoveVote_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveVote' +type MockVotings_RemoveVote_Call struct { + *mock.Call +} + +// RemoveVote is a helper method to define mock.On call +// - ctx context.Context +// - req dto.VoteRequest +func (_e *MockVotings_Expecter) RemoveVote(ctx interface{}, req interface{}) *MockVotings_RemoveVote_Call { + return &MockVotings_RemoveVote_Call{Call: _e.mock.On("RemoveVote", ctx, req)} +} + +func (_c *MockVotings_RemoveVote_Call) Run(run func(ctx context.Context, req dto.VoteRequest)) *MockVotings_RemoveVote_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.VoteRequest)) + }) + return _c +} + +func (_c *MockVotings_RemoveVote_Call) Return(_a0 error) *MockVotings_RemoveVote_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *MockVotings_RemoveVote_Call) RunAndReturn(run func(context.Context, dto.VoteRequest) error) *MockVotings_RemoveVote_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, body +func (_m *MockVotings) Update(ctx context.Context, body dto.VotingUpdateRequest) (*dto.Voting, error) { + ret := _m.Called(ctx, body) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 *dto.Voting + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, dto.VotingUpdateRequest) (*dto.Voting, error)); ok { + return rf(ctx, body) + } + if rf, ok := ret.Get(0).(func(context.Context, dto.VotingUpdateRequest) *dto.Voting); ok { + r0 = rf(ctx, body) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*dto.Voting) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, dto.VotingUpdateRequest) error); ok { + r1 = rf(ctx, body) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// MockVotings_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type MockVotings_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - body dto.VotingUpdateRequest +func (_e *MockVotings_Expecter) Update(ctx interface{}, body interface{}) *MockVotings_Update_Call { + return &MockVotings_Update_Call{Call: _e.mock.On("Update", ctx, body)} +} + +func (_c *MockVotings_Update_Call) Run(run func(ctx context.Context, body dto.VotingUpdateRequest)) *MockVotings_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(dto.VotingUpdateRequest)) + }) + return _c +} + +func (_c *MockVotings_Update_Call) Return(_a0 *dto.Voting, _a1 error) *MockVotings_Update_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *MockVotings_Update_Call) RunAndReturn(run func(context.Context, dto.VotingUpdateRequest) (*dto.Voting, error)) *MockVotings_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewMockVotings creates a new instance of MockVotings. 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 NewMockVotings(t interface { + mock.TestingT + Cleanup(func()) +}) *MockVotings { + mock := &MockVotings{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +}