Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InteractivesAPIClientMock ¶
type InteractivesAPIClientMock struct { // ListInteractivesFunc mocks the ListInteractives method. ListInteractivesFunc func(ctx context.Context, userAuthToken string, serviceAuthToken string, f *interactives.Filter) ([]interactives.Interactive, error) // contains filtered or unexported fields }
InteractivesAPIClientMock is a mock implementation of routes.InteractivesAPIClient.
func TestSomethingThatUsesInteractivesAPIClient(t *testing.T) { // make and configure a mocked routes.InteractivesAPIClient mockedInteractivesAPIClient := &InteractivesAPIClientMock{ ListInteractivesFunc: func(ctx context.Context, userAuthToken string, serviceAuthToken string, f *interactives.Filter) ([]interactives.Interactive, error) { panic("mock out the ListInteractives method") }, } // use mockedInteractivesAPIClient in code that requires routes.InteractivesAPIClient // and then make assertions. }
func (*InteractivesAPIClientMock) ListInteractives ¶
func (mock *InteractivesAPIClientMock) ListInteractives(ctx context.Context, userAuthToken string, serviceAuthToken string, f *interactives.Filter) ([]interactives.Interactive, error)
ListInteractives calls ListInteractivesFunc.
func (*InteractivesAPIClientMock) ListInteractivesCalls ¶
func (mock *InteractivesAPIClientMock) ListInteractivesCalls() []struct { Ctx context.Context UserAuthToken string ServiceAuthToken string F *interactives.Filter }
ListInteractivesCalls gets all the calls that were made to ListInteractives. Check the length with:
len(mockedInteractivesAPIClient.ListInteractivesCalls())
Click to show internal directories.
Click to hide internal directories.