usertest

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 FakeUserService

type FakeUserService struct {
	ExpectedUser             *user.User
	ExpectedSignedInUser     *user.SignedInUser
	ExpectedError            error
	ExpectedSetUsingOrgError error
	ExpectedSearchUsers      user.SearchUserQueryResult
	ExpectedUserProfileDTO   *user.UserProfileDTO
	ExpectedUserProfileDTOs  []*user.UserProfileDTO
	ExpectedUsageStats       map[string]any

	UpdateFn            func(ctx context.Context, cmd *user.UpdateUserCommand) error
	GetSignedInUserFn   func(ctx context.Context, query *user.GetSignedInUserQuery) (*user.SignedInUser, error)
	CreateFn            func(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error)
	BatchDisableUsersFn func(ctx context.Context, cmd *user.BatchDisableUsersCommand) error
	GetByEmailFn        func(ctx context.Context, query *user.GetUserByEmailQuery) (*user.User, error)
	// contains filtered or unexported fields
}

func NewUserServiceFake

func NewUserServiceFake() *FakeUserService

func (*FakeUserService) BatchDisableUsers

func (f *FakeUserService) BatchDisableUsers(ctx context.Context, cmd *user.BatchDisableUsersCommand) error

func (*FakeUserService) Create

func (*FakeUserService) CreateServiceAccount

func (f *FakeUserService) CreateServiceAccount(ctx context.Context, cmd *user.CreateUserCommand) (*user.User, error)

func (*FakeUserService) Delete

func (*FakeUserService) GetByEmail

func (f *FakeUserService) GetByEmail(ctx context.Context, query *user.GetUserByEmailQuery) (*user.User, error)

func (*FakeUserService) GetByID

func (f *FakeUserService) GetByID(ctx context.Context, query *user.GetUserByIDQuery) (*user.User, error)

func (*FakeUserService) GetByLogin

func (f *FakeUserService) GetByLogin(ctx context.Context, query *user.GetUserByLoginQuery) (*user.User, error)

func (*FakeUserService) GetProfile

func (*FakeUserService) GetSignedInUser

func (f *FakeUserService) GetSignedInUser(ctx context.Context, query *user.GetSignedInUserQuery) (*user.SignedInUser, error)

func (FakeUserService) GetUsageStats

func (f FakeUserService) GetUsageStats(ctx context.Context) map[string]any

func (*FakeUserService) NewAnonymousSignedInUser

func (f *FakeUserService) NewAnonymousSignedInUser(ctx context.Context) (*user.SignedInUser, error)

func (*FakeUserService) Search

func (*FakeUserService) Update

func (*FakeUserService) UpdateLastSeenAt

func (f *FakeUserService) UpdateLastSeenAt(ctx context.Context, cmd *user.UpdateUserLastSeenAtCommand) 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) BatchDisableUsers

func (_m *MockService) BatchDisableUsers(_a0 context.Context, _a1 *user.BatchDisableUsersCommand) error

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

func (*MockService) Create

func (_m *MockService) Create(_a0 context.Context, _a1 *user.CreateUserCommand) (*user.User, error)

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

func (*MockService) CreateServiceAccount

func (_m *MockService) CreateServiceAccount(_a0 context.Context, _a1 *user.CreateUserCommand) (*user.User, error)

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

func (*MockService) Delete

func (_m *MockService) Delete(_a0 context.Context, _a1 *user.DeleteUserCommand) error

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

func (*MockService) GetByEmail

func (_m *MockService) GetByEmail(_a0 context.Context, _a1 *user.GetUserByEmailQuery) (*user.User, error)

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

func (*MockService) GetByID

func (_m *MockService) GetByID(_a0 context.Context, _a1 *user.GetUserByIDQuery) (*user.User, error)

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

func (*MockService) GetByLogin

func (_m *MockService) GetByLogin(_a0 context.Context, _a1 *user.GetUserByLoginQuery) (*user.User, error)

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

func (*MockService) GetProfile

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

func (*MockService) GetSignedInUser

func (_m *MockService) GetSignedInUser(_a0 context.Context, _a1 *user.GetSignedInUserQuery) (*user.SignedInUser, error)

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

func (*MockService) GetSignedInUserWithCacheCtx

func (_m *MockService) GetSignedInUserWithCacheCtx(_a0 context.Context, _a1 *user.GetSignedInUserQuery) (*user.SignedInUser, error)

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

func (*MockService) GetUsageStats

func (_m *MockService) GetUsageStats(ctx context.Context) map[string]interface{}

GetUsageStats provides a mock function with given fields: ctx

func (*MockService) Search

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

func (*MockService) Update

func (_m *MockService) Update(_a0 context.Context, _a1 *user.UpdateUserCommand) error

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

func (*MockService) UpdateLastSeenAt

func (_m *MockService) UpdateLastSeenAt(_a0 context.Context, _a1 *user.UpdateUserLastSeenAtCommand) error

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

Jump to

Keyboard shortcuts

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