Documentation ¶
Index ¶
- type ClientMock
- func (mock *ClientMock) GetOutputBytes(ctx context.Context, userAuthToken string, serviceAuthToken string, ...) ([]byte, error)
- func (mock *ClientMock) GetOutputBytesCalls() []struct{ ... }
- func (mock *ClientMock) UpdateFilterOutputBytes(ctx context.Context, userAuthToken string, serviceAuthToken string, ...) error
- func (mock *ClientMock) UpdateFilterOutputBytesCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientMock ¶
type ClientMock struct { // GetOutputBytesFunc mocks the GetOutputBytes method. GetOutputBytesFunc func(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, collectionID string, filterOutputID string) ([]byte, error) // UpdateFilterOutputBytesFunc mocks the UpdateFilterOutputBytes method. UpdateFilterOutputBytesFunc func(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, filterJobID string, b []byte) error // contains filtered or unexported fields }
ClientMock is a mock implementation of filter.Client.
func TestSomethingThatUsesClient(t *testing.T) { // make and configure a mocked filter.Client mockedClient := &ClientMock{ GetOutputBytesFunc: func(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, collectionID string, filterOutputID string) ([]byte, error) { panic("mock out the GetOutputBytes method") }, UpdateFilterOutputBytesFunc: func(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, filterJobID string, b []byte) error { panic("mock out the UpdateFilterOutputBytes method") }, } // use mockedClient in code that requires filter.Client // and then make assertions. }
func (*ClientMock) GetOutputBytes ¶
func (mock *ClientMock) GetOutputBytes(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, collectionID string, filterOutputID string) ([]byte, error)
GetOutputBytes calls GetOutputBytesFunc.
func (*ClientMock) GetOutputBytesCalls ¶
func (mock *ClientMock) GetOutputBytesCalls() []struct { Ctx context.Context UserAuthToken string ServiceAuthToken string DownloadServiceToken string CollectionID string FilterOutputID string }
GetOutputBytesCalls gets all the calls that were made to GetOutputBytes. Check the length with:
len(mockedClient.GetOutputBytesCalls())
func (*ClientMock) UpdateFilterOutputBytes ¶
func (mock *ClientMock) UpdateFilterOutputBytes(ctx context.Context, userAuthToken string, serviceAuthToken string, downloadServiceToken string, filterJobID string, b []byte) error
UpdateFilterOutputBytes calls UpdateFilterOutputBytesFunc.
func (*ClientMock) UpdateFilterOutputBytesCalls ¶
func (mock *ClientMock) UpdateFilterOutputBytesCalls() []struct { Ctx context.Context UserAuthToken string ServiceAuthToken string DownloadServiceToken string FilterJobID string B []byte }
UpdateFilterOutputBytesCalls gets all the calls that were made to UpdateFilterOutputBytes. Check the length with:
len(mockedClient.UpdateFilterOutputBytesCalls())
Click to show internal directories.
Click to hide internal directories.