Documentation
¶
Overview ¶
Package testutil provides shared test utilities for CloudMock service tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLocator ¶
type MockLocator struct {
// contains filtered or unexported fields
}
MockLocator is a ServiceLocator for unit tests that returns pre-configured services.
func NewMockLocator ¶
func NewMockLocator(services map[string]service.Service) *MockLocator
NewMockLocator creates a MockLocator from a map of service name → service.
func (*MockLocator) Lookup ¶
func (m *MockLocator) Lookup(name string) (service.Service, error)
Lookup returns the service registered under the given name, or an error if not found.
func (*MockLocator) Register ¶
func (m *MockLocator) Register(svc service.Service)
Register adds a service to the mock locator.
Click to show internal directories.
Click to hide internal directories.