Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQSClientMock ¶
type SQSClientMock struct { // SendMessageFunc mocks the SendMessage method. SendMessageFunc func(ctx context.Context, params *sqs.SendMessageInput, optFns ...func(*sqs.Options)) (*sqs.SendMessageOutput, error) // contains filtered or unexported fields }
SQSClientMock is a mock implementation of analytics.SQSClient.
func TestSomethingThatUsesSQSClient(t *testing.T) { // make and configure a mocked analytics.SQSClient mockedSQSClient := &SQSClientMock{ SendMessageFunc: func(ctx context.Context, params *sqs.SendMessageInput, optFns ...func(*sqs.Options)) (*sqs.SendMessageOutput, error) { panic("mock out the SendMessage method") }, } // use mockedSQSClient in code that requires analytics.SQSClient // and then make assertions. }
func (*SQSClientMock) SendMessage ¶
func (mock *SQSClientMock) SendMessage(ctx context.Context, params *sqs.SendMessageInput, optFns ...func(*sqs.Options)) (*sqs.SendMessageOutput, error)
SendMessage calls SendMessageFunc.
func (*SQSClientMock) SendMessageCalls ¶
func (mock *SQSClientMock) SendMessageCalls() []struct { Ctx context.Context Params *sqs.SendMessageInput OptFns []func(*sqs.Options) }
SendMessageCalls gets all the calls that were made to SendMessage. Check the length with:
len(mockedSQSClient.SendMessageCalls())
Click to show internal directories.
Click to hide internal directories.