Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CityWorkSvc ¶
type CityWorkSvc interface { Start(ctx context.Context) error // contains filtered or unexported methods }
func NewCityWorkService ¶
func NewCityWorkService(ctx context.Context, s SdlClient, timeInterval int, c client.ContextBrokerClient) CityWorkSvc
type SdlClientMock ¶
type SdlClientMock struct { // GetFunc mocks the Get method. GetFunc func(cxt context.Context) (*sdlResponse, error) // contains filtered or unexported fields }
SdlClientMock is a mock implementation of SdlClient.
func TestSomethingThatUsesSdlClient(t *testing.T) { // make and configure a mocked SdlClient mockedSdlClient := &SdlClientMock{ GetFunc: func(cxt context.Context) (*sdlResponse, error) { panic("mock out the Get method") }, } // use mockedSdlClient in code that requires SdlClient // and then make assertions. }
func (*SdlClientMock) Get ¶
func (mock *SdlClientMock) Get(cxt context.Context) (*sdlResponse, error)
Get calls GetFunc.
func (*SdlClientMock) GetCalls ¶
func (mock *SdlClientMock) GetCalls() []struct { Cxt context.Context }
GetCalls gets all the calls that were made to Get. Check the length with:
len(mockedSdlClient.GetCalls())
Click to show internal directories.
Click to hide internal directories.