3
0

fix(tests): regenerate mocks with new internal pkgs

This commit is contained in:
Tit Petric 2019-03-14 23:50:44 +01:00
parent a8c5cc227d
commit db65a89c8d
4 changed files with 14 additions and 64 deletions

View File

@ -145,21 +145,21 @@ mocks: $(GOMOCK)
rm -f */*/*_mock_test.go */*/mocks/*
# See https://github.com/golang/mock for details
$(MOCKGEN) -package service -source crm/service/notification.go -destination crm/service/notification_mock_test.go
$(MOCKGEN) -package service -source crm/internal/service/notification.go -destination crm/internal/service/notification_mock_test.go
$(MOCKGEN) -package service -source messaging/service/attachment.go -destination messaging/service/attachment_mock_test.go
$(MOCKGEN) -package service -source messaging/service/channel.go -destination messaging/service/channel_mock_test.go
$(MOCKGEN) -package service -source messaging/service/message.go -destination messaging/service/message_mock_test.go
$(MOCKGEN) -package service -source system/service/organisation.go -destination system/service/organisation_mock_test.go
$(MOCKGEN) -package service -source system/service/role.go -destination system/service/role_mock_test.go
$(MOCKGEN) -package service -source system/service/user.go -destination system/service/user_mock_test.go
$(MOCKGEN) -package service -source messaging/internal/service/attachment.go -destination messaging/internal/service/attachment_mock_test.go
$(MOCKGEN) -package service -source messaging/internal/service/channel.go -destination messaging/internal/service/channel_mock_test.go
$(MOCKGEN) -package service -source messaging/internal/service/message.go -destination messaging/internal/service/message_mock_test.go
$(MOCKGEN) -package service -source system/internal/service/organisation.go -destination system/internal/service/organisation_mock_test.go
$(MOCKGEN) -package service -source system/internal/service/role.go -destination system/internal/service/role_mock_test.go
$(MOCKGEN) -package service -source system/internal/service/user.go -destination system/internal/service/user_mock_test.go
$(MOCKGEN) -package mail -source internal/mail/mail.go -destination internal/mail/mail_mock_test.go
$(MOCKGEN) -package rules -source internal/rules/interfaces.go -destination internal/rules/resources_mock_test.go
mkdir -p system/repository/mocks
$(MOCKGEN) -package repository -source system/repository/user.go -destination system/repository/mocks/user.go
$(MOCKGEN) -package repository -source system/repository/credentials.go -destination system/repository/mocks/credentials.go
mkdir -p system/internal/repository/mocks
$(MOCKGEN) -package repository -source system/internal/repository/user.go -destination system/internal/repository/mocks/user.go
$(MOCKGEN) -package repository -source system/internal/repository/credentials.go -destination system/internal/repository/mocks/credentials.go
########################################################################################################################

View File

@ -6,8 +6,6 @@ package service
import (
context "context"
service0 "github.com/crusttech/crust/system/service"
types "github.com/crusttech/crust/system/types"
gomock "github.com/golang/mock/gomock"
mail_v2 "gopkg.in/mail.v2"
reflect "reflect"
@ -76,51 +74,3 @@ func (mr *MockNotificationServiceMockRecorder) AttachEmailRecipients(message, fi
varargs := append([]interface{}{message, field}, recipients...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachEmailRecipients", reflect.TypeOf((*MockNotificationService)(nil).AttachEmailRecipients), varargs...)
}
// MocknotificationUserService is a mock of notificationUserService interface
type MocknotificationUserService struct {
ctrl *gomock.Controller
recorder *MocknotificationUserServiceMockRecorder
}
// MocknotificationUserServiceMockRecorder is the mock recorder for MocknotificationUserService
type MocknotificationUserServiceMockRecorder struct {
mock *MocknotificationUserService
}
// NewMocknotificationUserService creates a new mock instance
func NewMocknotificationUserService(ctrl *gomock.Controller) *MocknotificationUserService {
mock := &MocknotificationUserService{ctrl: ctrl}
mock.recorder = &MocknotificationUserServiceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MocknotificationUserService) EXPECT() *MocknotificationUserServiceMockRecorder {
return m.recorder
}
// With mocks base method
func (m *MocknotificationUserService) With(ctx context.Context) service0.UserService {
ret := m.ctrl.Call(m, "With", ctx)
ret0, _ := ret[0].(service0.UserService)
return ret0
}
// With indicates an expected call of With
func (mr *MocknotificationUserServiceMockRecorder) With(ctx interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "With", reflect.TypeOf((*MocknotificationUserService)(nil).With), ctx)
}
// FindByID mocks base method
func (m *MocknotificationUserService) FindByID(userID uint64) (*types.User, error) {
ret := m.ctrl.Call(m, "FindByID", userID)
ret0, _ := ret[0].(*types.User)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindByID indicates an expected call of FindByID
func (mr *MocknotificationUserServiceMockRecorder) FindByID(userID interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByID", reflect.TypeOf((*MocknotificationUserService)(nil).FindByID), userID)
}

View File

@ -1,12 +1,12 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: system/repository/credentials.go
// Source: system/internal/repository/credentials.go
// Package repository is a generated GoMock package.
package repository
import (
repository "app/system/internal/repository"
context "context"
repository "github.com/crusttech/crust/system/repository"
types "github.com/crusttech/crust/system/types"
gomock "github.com/golang/mock/gomock"
factory "github.com/titpetric/factory"

View File

@ -1,12 +1,12 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: system/repository/user.go
// Source: system/internal/repository/user.go
// Package repository is a generated GoMock package.
package repository
import (
repository "app/system/internal/repository"
context "context"
repository "github.com/crusttech/crust/system/repository"
types "github.com/crusttech/crust/system/types"
gomock "github.com/golang/mock/gomock"
factory "github.com/titpetric/factory"