Documentation ¶
Index ¶
- type ZebedeeClientMock
- func (mock *ZebedeeClientMock) Checker(in1 context.Context, in2 *healthcheck.CheckState) error
- func (mock *ZebedeeClientMock) CheckerCalls() []struct{ ... }
- func (mock *ZebedeeClientMock) GetPublishedData(ctx context.Context, uriString string) ([]byte, error)
- func (mock *ZebedeeClientMock) GetPublishedDataCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZebedeeClientMock ¶
type ZebedeeClientMock struct { // CheckerFunc mocks the Checker method. CheckerFunc func(in1 context.Context, in2 *healthcheck.CheckState) error // GetPublishedDataFunc mocks the GetPublishedData method. GetPublishedDataFunc func(ctx context.Context, uriString string) ([]byte, error) // contains filtered or unexported fields }
ZebedeeClientMock is a mock implementation of clients.ZebedeeClient.
func TestSomethingThatUsesZebedeeClient(t *testing.T) { // make and configure a mocked clients.ZebedeeClient mockedZebedeeClient := &ZebedeeClientMock{ CheckerFunc: func(in1 context.Context, in2 *healthcheck.CheckState) error { panic("mock out the Checker method") }, GetPublishedDataFunc: func(ctx context.Context, uriString string) ([]byte, error) { panic("mock out the GetPublishedData method") }, } // use mockedZebedeeClient in code that requires clients.ZebedeeClient // and then make assertions. }
func (*ZebedeeClientMock) Checker ¶
func (mock *ZebedeeClientMock) Checker(in1 context.Context, in2 *healthcheck.CheckState) error
Checker calls CheckerFunc.
func (*ZebedeeClientMock) CheckerCalls ¶
func (mock *ZebedeeClientMock) CheckerCalls() []struct { In1 context.Context In2 *healthcheck.CheckState }
CheckerCalls gets all the calls that were made to Checker. Check the length with:
len(mockedZebedeeClient.CheckerCalls())
func (*ZebedeeClientMock) GetPublishedData ¶
func (mock *ZebedeeClientMock) GetPublishedData(ctx context.Context, uriString string) ([]byte, error)
GetPublishedData calls GetPublishedDataFunc.
func (*ZebedeeClientMock) GetPublishedDataCalls ¶
func (mock *ZebedeeClientMock) GetPublishedDataCalls() []struct { Ctx context.Context UriString string }
GetPublishedDataCalls gets all the calls that were made to GetPublishedData. Check the length with:
len(mockedZebedeeClient.GetPublishedDataCalls())
Click to show internal directories.
Click to hide internal directories.