Documentation ¶
Index ¶
- func Join(elems []string, sep string, mod func(string) string) string
- type IntegrationIncident
- type IntegrationIncidentMock
- func (mock *IntegrationIncidentMock) DeviceStateUpdated(ctx context.Context, deviceId string, statusMessage models.StatusMessage) error
- func (mock *IntegrationIncidentMock) DeviceStateUpdatedCalls() []struct{ ... }
- func (mock *IntegrationIncidentMock) LifebuoyValueUpdated(ctx context.Context, deviceId string, deviceValue string) error
- func (mock *IntegrationIncidentMock) LifebuoyValueUpdatedCalls() []struct{ ... }
- func (mock *IntegrationIncidentMock) SewageOverflowObserved(ctx context.Context, functionUpdated models.FunctionUpdated) error
- func (mock *IntegrationIncidentMock) SewageOverflowObservedCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IntegrationIncident ¶
type IntegrationIncident interface { DeviceStateUpdated(ctx context.Context, deviceId string, statusMessage models.StatusMessage) error LifebuoyValueUpdated(ctx context.Context, deviceId, deviceValue string) error SewageOverflowObserved(ctx context.Context, functionUpdated models.FunctionUpdated) error }
func NewApplication ¶
func NewApplication(_ context.Context, incidentReporter incident.ReporterFunc, entityLocator services.EntityLocator) IntegrationIncident
type IntegrationIncidentMock ¶
type IntegrationIncidentMock struct { // DeviceStateUpdatedFunc mocks the DeviceStateUpdated method. DeviceStateUpdatedFunc func(ctx context.Context, deviceId string, statusMessage models.StatusMessage) error // LifebuoyValueUpdatedFunc mocks the LifebuoyValueUpdated method. LifebuoyValueUpdatedFunc func(ctx context.Context, deviceId string, deviceValue string) error // SewageOverflowObservedFunc mocks the SewageOverflowObserved method. SewageOverflowObservedFunc func(ctx context.Context, functionUpdated models.FunctionUpdated) error // contains filtered or unexported fields }
IntegrationIncidentMock is a mock implementation of IntegrationIncident.
func TestSomethingThatUsesIntegrationIncident(t *testing.T) { // make and configure a mocked IntegrationIncident mockedIntegrationIncident := &IntegrationIncidentMock{ DeviceStateUpdatedFunc: func(ctx context.Context, deviceId string, statusMessage models.StatusMessage) error { panic("mock out the DeviceStateUpdated method") }, LifebuoyValueUpdatedFunc: func(ctx context.Context, deviceId string, deviceValue string) error { panic("mock out the LifebuoyValueUpdated method") }, SewageOverflowObservedFunc: func(ctx context.Context, functionUpdated models.FunctionUpdated) error { panic("mock out the SewageOverflowObserved method") }, } // use mockedIntegrationIncident in code that requires IntegrationIncident // and then make assertions. }
func (*IntegrationIncidentMock) DeviceStateUpdated ¶
func (mock *IntegrationIncidentMock) DeviceStateUpdated(ctx context.Context, deviceId string, statusMessage models.StatusMessage) error
DeviceStateUpdated calls DeviceStateUpdatedFunc.
func (*IntegrationIncidentMock) DeviceStateUpdatedCalls ¶
func (mock *IntegrationIncidentMock) DeviceStateUpdatedCalls() []struct { Ctx context.Context DeviceId string StatusMessage models.StatusMessage }
DeviceStateUpdatedCalls gets all the calls that were made to DeviceStateUpdated. Check the length with:
len(mockedIntegrationIncident.DeviceStateUpdatedCalls())
func (*IntegrationIncidentMock) LifebuoyValueUpdated ¶
func (mock *IntegrationIncidentMock) LifebuoyValueUpdated(ctx context.Context, deviceId string, deviceValue string) error
LifebuoyValueUpdated calls LifebuoyValueUpdatedFunc.
func (*IntegrationIncidentMock) LifebuoyValueUpdatedCalls ¶
func (mock *IntegrationIncidentMock) LifebuoyValueUpdatedCalls() []struct { Ctx context.Context DeviceId string DeviceValue string }
LifebuoyValueUpdatedCalls gets all the calls that were made to LifebuoyValueUpdated. Check the length with:
len(mockedIntegrationIncident.LifebuoyValueUpdatedCalls())
func (*IntegrationIncidentMock) SewageOverflowObserved ¶
func (mock *IntegrationIncidentMock) SewageOverflowObserved(ctx context.Context, functionUpdated models.FunctionUpdated) error
SewageOverflowObserved calls SewageOverflowObservedFunc.
func (*IntegrationIncidentMock) SewageOverflowObservedCalls ¶
func (mock *IntegrationIncidentMock) SewageOverflowObservedCalls() []struct { Ctx context.Context FunctionUpdated models.FunctionUpdated }
SewageOverflowObservedCalls gets all the calls that were made to SewageOverflowObserved. Check the length with:
len(mockedIntegrationIncident.SewageOverflowObservedCalls())
Click to show internal directories.
Click to hide internal directories.