orgtest

package
v11.1.4-modfix Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeOrgService

type FakeOrgService struct {
	ExpectedOrgUserID            int64
	ExpectedError                error
	ExpectedUserOrgDTO           []*org.UserOrgDTO
	ExpectedOrgs                 []*org.OrgDTO
	ExpectedOrg                  *org.Org
	ExpectedOrgUsers             []*org.OrgUserDTO
	ExpectedSearchOrgUsersResult *org.SearchOrgUsersQueryResult
	ExpectedOrgListResponse      OrgListResponse
}

func NewOrgServiceFake

func NewOrgServiceFake() *FakeOrgService

func (*FakeOrgService) AddOrgUser

func (f *FakeOrgService) AddOrgUser(ctx context.Context, cmd *org.AddOrgUserCommand) error

func (*FakeOrgService) CreateWithMember

func (f *FakeOrgService) CreateWithMember(ctx context.Context, cmd *org.CreateOrgCommand) (*org.Org, error)

func (*FakeOrgService) Delete

func (f *FakeOrgService) Delete(ctx context.Context, cmd *org.DeleteOrgCommand) error

func (*FakeOrgService) DeleteUserFromAll

func (f *FakeOrgService) DeleteUserFromAll(ctx context.Context, userID int64) error

func (*FakeOrgService) GetByID

func (f *FakeOrgService) GetByID(ctx context.Context, query *org.GetOrgByIDQuery) (*org.Org, error)

func (*FakeOrgService) GetByName

func (f *FakeOrgService) GetByName(ctx context.Context, query *org.GetOrgByNameQuery) (*org.Org, error)

func (*FakeOrgService) GetIDForNewUser

func (f *FakeOrgService) GetIDForNewUser(ctx context.Context, cmd org.GetOrgIDForNewUserCommand) (int64, error)

func (*FakeOrgService) GetOrCreate

func (f *FakeOrgService) GetOrCreate(ctx context.Context, orgName string) (int64, error)

func (*FakeOrgService) GetOrgUsers

func (f *FakeOrgService) GetOrgUsers(ctx context.Context, query *org.GetOrgUsersQuery) ([]*org.OrgUserDTO, error)

func (*FakeOrgService) GetUserOrgList

func (f *FakeOrgService) GetUserOrgList(ctx context.Context, query *org.GetUserOrgListQuery) ([]*org.UserOrgDTO, error)

func (*FakeOrgService) Insert

func (f *FakeOrgService) Insert(ctx context.Context, cmd *org.OrgUser) (int64, error)

func (*FakeOrgService) InsertOrgUser

func (f *FakeOrgService) InsertOrgUser(ctx context.Context, cmd *org.OrgUser) (int64, error)

func (*FakeOrgService) RegisterDelete

func (f *FakeOrgService) RegisterDelete(query string)

func (*FakeOrgService) RemoveOrgUser

func (f *FakeOrgService) RemoveOrgUser(ctx context.Context, cmd *org.RemoveOrgUserCommand) error

func (*FakeOrgService) Search

func (f *FakeOrgService) Search(ctx context.Context, query *org.SearchOrgsQuery) ([]*org.OrgDTO, error)

func (*FakeOrgService) SearchOrgUsers

func (*FakeOrgService) UpdateAddress

func (f *FakeOrgService) UpdateAddress(ctx context.Context, cmd *org.UpdateOrgAddressCommand) error

func (*FakeOrgService) UpdateOrg

func (f *FakeOrgService) UpdateOrg(ctx context.Context, cmd *org.UpdateOrgCommand) error

func (*FakeOrgService) UpdateOrgUser

func (f *FakeOrgService) UpdateOrgUser(ctx context.Context, cmd *org.UpdateOrgUserCommand) error

type MockService

type MockService struct {
	mock.Mock
}

MockService is an autogenerated mock type for the Service type

func NewMockService

func NewMockService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockService

NewMockService creates a new instance of MockService. 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 (*MockService) AddOrgUser

func (_m *MockService) AddOrgUser(_a0 context.Context, _a1 *org.AddOrgUserCommand) error

AddOrgUser provides a mock function with given fields: _a0, _a1

func (*MockService) CreateWithMember

func (_m *MockService) CreateWithMember(_a0 context.Context, _a1 *org.CreateOrgCommand) (*org.Org, error)

CreateWithMember provides a mock function with given fields: _a0, _a1

func (*MockService) Delete

func (_m *MockService) Delete(_a0 context.Context, _a1 *org.DeleteOrgCommand) error

Delete provides a mock function with given fields: _a0, _a1

func (*MockService) DeleteUserFromAll

func (_m *MockService) DeleteUserFromAll(_a0 context.Context, _a1 int64) error

DeleteUserFromAll provides a mock function with given fields: _a0, _a1

func (*MockService) GetByID

func (_m *MockService) GetByID(_a0 context.Context, _a1 *org.GetOrgByIDQuery) (*org.Org, error)

GetByID provides a mock function with given fields: _a0, _a1

func (*MockService) GetByName

func (_m *MockService) GetByName(_a0 context.Context, _a1 *org.GetOrgByNameQuery) (*org.Org, error)

GetByName provides a mock function with given fields: _a0, _a1

func (*MockService) GetIDForNewUser

func (_m *MockService) GetIDForNewUser(_a0 context.Context, _a1 org.GetOrgIDForNewUserCommand) (int64, error)

GetIDForNewUser provides a mock function with given fields: _a0, _a1

func (*MockService) GetOrCreate

func (_m *MockService) GetOrCreate(_a0 context.Context, _a1 string) (int64, error)

GetOrCreate provides a mock function with given fields: _a0, _a1

func (*MockService) GetOrgUsers

func (_m *MockService) GetOrgUsers(_a0 context.Context, _a1 *org.GetOrgUsersQuery) ([]*org.OrgUserDTO, error)

GetOrgUsers provides a mock function with given fields: _a0, _a1

func (*MockService) GetUserOrgList

func (_m *MockService) GetUserOrgList(_a0 context.Context, _a1 *org.GetUserOrgListQuery) ([]*org.UserOrgDTO, error)

GetUserOrgList provides a mock function with given fields: _a0, _a1

func (*MockService) InsertOrgUser

func (_m *MockService) InsertOrgUser(_a0 context.Context, _a1 *org.OrgUser) (int64, error)

InsertOrgUser provides a mock function with given fields: _a0, _a1

func (*MockService) RegisterDelete

func (_m *MockService) RegisterDelete(query string)

RegisterDelete provides a mock function with given fields: query

func (*MockService) RemoveOrgUser

func (_m *MockService) RemoveOrgUser(_a0 context.Context, _a1 *org.RemoveOrgUserCommand) error

RemoveOrgUser provides a mock function with given fields: _a0, _a1

func (*MockService) Search

func (_m *MockService) Search(_a0 context.Context, _a1 *org.SearchOrgsQuery) ([]*org.OrgDTO, error)

Search provides a mock function with given fields: _a0, _a1

func (*MockService) SearchOrgUsers

SearchOrgUsers provides a mock function with given fields: _a0, _a1

func (*MockService) UpdateAddress

func (_m *MockService) UpdateAddress(_a0 context.Context, _a1 *org.UpdateOrgAddressCommand) error

UpdateAddress provides a mock function with given fields: _a0, _a1

func (*MockService) UpdateOrg

func (_m *MockService) UpdateOrg(_a0 context.Context, _a1 *org.UpdateOrgCommand) error

UpdateOrg provides a mock function with given fields: _a0, _a1

func (*MockService) UpdateOrgUser

func (_m *MockService) UpdateOrgUser(_a0 context.Context, _a1 *org.UpdateOrgUserCommand) error

UpdateOrgUser provides a mock function with given fields: _a0, _a1

type OrgListResponse

type OrgListResponse []struct {
	OrgID    int64
	Response error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL