Documentation ¶
Index ¶
- type RoadAccidentService
- type RoadAccidentServiceMock
- func (mock *RoadAccidentServiceMock) Broker() string
- func (mock *RoadAccidentServiceMock) BrokerCalls() []struct{}
- func (mock *RoadAccidentServiceMock) GetAll() []byte
- func (mock *RoadAccidentServiceMock) GetAllCalls() []struct{}
- func (mock *RoadAccidentServiceMock) GetByID(id string) ([]byte, error)
- func (mock *RoadAccidentServiceMock) GetByIDCalls() []struct{ ... }
- func (mock *RoadAccidentServiceMock) Shutdown(ctx context.Context)
- func (mock *RoadAccidentServiceMock) ShutdownCalls() []struct{ ... }
- func (mock *RoadAccidentServiceMock) Start(ctx context.Context)
- func (mock *RoadAccidentServiceMock) StartCalls() []struct{ ... }
- func (mock *RoadAccidentServiceMock) Tenant() string
- func (mock *RoadAccidentServiceMock) TenantCalls() []struct{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RoadAccidentService ¶
type RoadAccidentService interface { Broker() string Tenant() string GetAll() []byte GetByID(id string) ([]byte, error) Start(ctx context.Context) Shutdown(ctx context.Context) }
func NewRoadAccidentService ¶
func NewRoadAccidentService(ctx context.Context, contextBrokerURL, tenant string) RoadAccidentService
type RoadAccidentServiceMock ¶
type RoadAccidentServiceMock struct { // BrokerFunc mocks the Broker method. BrokerFunc func() string // GetAllFunc mocks the GetAll method. GetAllFunc func() []byte // GetByIDFunc mocks the GetByID method. GetByIDFunc func(id string) ([]byte, error) // ShutdownFunc mocks the Shutdown method. ShutdownFunc func(ctx context.Context) // StartFunc mocks the Start method. StartFunc func(ctx context.Context) // TenantFunc mocks the Tenant method. TenantFunc func() string // contains filtered or unexported fields }
RoadAccidentServiceMock is a mock implementation of RoadAccidentService.
func TestSomethingThatUsesRoadAccidentService(t *testing.T) { // make and configure a mocked RoadAccidentService mockedRoadAccidentService := &RoadAccidentServiceMock{ BrokerFunc: func() string { panic("mock out the Broker method") }, GetAllFunc: func() []byte { panic("mock out the GetAll method") }, GetByIDFunc: func(id string) ([]byte, error) { panic("mock out the GetByID method") }, ShutdownFunc: func(ctx context.Context) { panic("mock out the Shutdown method") }, StartFunc: func(ctx context.Context) { panic("mock out the Start method") }, TenantFunc: func() string { panic("mock out the Tenant method") }, } // use mockedRoadAccidentService in code that requires RoadAccidentService // and then make assertions. }
func (*RoadAccidentServiceMock) Broker ¶
func (mock *RoadAccidentServiceMock) Broker() string
Broker calls BrokerFunc.
func (*RoadAccidentServiceMock) BrokerCalls ¶
func (mock *RoadAccidentServiceMock) BrokerCalls() []struct { }
BrokerCalls gets all the calls that were made to Broker. Check the length with:
len(mockedRoadAccidentService.BrokerCalls())
func (*RoadAccidentServiceMock) GetAll ¶
func (mock *RoadAccidentServiceMock) GetAll() []byte
GetAll calls GetAllFunc.
func (*RoadAccidentServiceMock) GetAllCalls ¶
func (mock *RoadAccidentServiceMock) GetAllCalls() []struct { }
GetAllCalls gets all the calls that were made to GetAll. Check the length with:
len(mockedRoadAccidentService.GetAllCalls())
func (*RoadAccidentServiceMock) GetByID ¶
func (mock *RoadAccidentServiceMock) GetByID(id string) ([]byte, error)
GetByID calls GetByIDFunc.
func (*RoadAccidentServiceMock) GetByIDCalls ¶
func (mock *RoadAccidentServiceMock) GetByIDCalls() []struct { ID string }
GetByIDCalls gets all the calls that were made to GetByID. Check the length with:
len(mockedRoadAccidentService.GetByIDCalls())
func (*RoadAccidentServiceMock) Shutdown ¶
func (mock *RoadAccidentServiceMock) Shutdown(ctx context.Context)
Shutdown calls ShutdownFunc.
func (*RoadAccidentServiceMock) ShutdownCalls ¶
func (mock *RoadAccidentServiceMock) ShutdownCalls() []struct { Ctx context.Context }
ShutdownCalls gets all the calls that were made to Shutdown. Check the length with:
len(mockedRoadAccidentService.ShutdownCalls())
func (*RoadAccidentServiceMock) Start ¶
func (mock *RoadAccidentServiceMock) Start(ctx context.Context)
Start calls StartFunc.
func (*RoadAccidentServiceMock) StartCalls ¶
func (mock *RoadAccidentServiceMock) StartCalls() []struct { Ctx context.Context }
StartCalls gets all the calls that were made to Start. Check the length with:
len(mockedRoadAccidentService.StartCalls())
func (*RoadAccidentServiceMock) Tenant ¶
func (mock *RoadAccidentServiceMock) Tenant() string
Tenant calls TenantFunc.
func (*RoadAccidentServiceMock) TenantCalls ¶
func (mock *RoadAccidentServiceMock) TenantCalls() []struct { }
TenantCalls gets all the calls that were made to Tenant. Check the length with:
len(mockedRoadAccidentService.TenantCalls())