Documentation
¶
Overview ¶
Package mocks provides test doubles for the SendGrid email service.
Index ¶
- type MockEmailService
- type MockEmailService_Expecter
- type MockEmailService_GetSendGridClient_Call
- func (_c *MockEmailService_GetSendGridClient_Call) Return(client *sendgrid.Client) *MockEmailService_GetSendGridClient_Call
- func (_c *MockEmailService_GetSendGridClient_Call) Run(run func()) *MockEmailService_GetSendGridClient_Call
- func (_c *MockEmailService_GetSendGridClient_Call) RunAndReturn(run func() *sendgrid.Client) *MockEmailService_GetSendGridClient_Call
- type MockEmailService_Send_Call
- func (_c *MockEmailService_Send_Call) Return(err error) *MockEmailService_Send_Call
- func (_c *MockEmailService_Send_Call) Run(run func(ctx context.Context, req *models.EmailNotificationRequest)) *MockEmailService_Send_Call
- func (_c *MockEmailService_Send_Call) RunAndReturn(run func(ctx context.Context, req *models.EmailNotificationRequest) error) *MockEmailService_Send_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockEmailService ¶
MockEmailService is an autogenerated mock type for the EmailService type
func NewMockEmailService ¶
func NewMockEmailService(t interface {
mock.TestingT
Cleanup(func())
}) *MockEmailService
NewMockEmailService creates a new instance of MockEmailService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockEmailService) EXPECT ¶
func (_m *MockEmailService) EXPECT() *MockEmailService_Expecter
func (*MockEmailService) GetSendGridClient ¶
func (_mock *MockEmailService) GetSendGridClient() *sendgrid.Client
GetSendGridClient provides a mock function for the type MockEmailService
func (*MockEmailService) Send ¶
func (_mock *MockEmailService) Send(ctx context.Context, req *models.EmailNotificationRequest) error
Send provides a mock function for the type MockEmailService
type MockEmailService_Expecter ¶
type MockEmailService_Expecter struct {
// contains filtered or unexported fields
}
func (*MockEmailService_Expecter) GetSendGridClient ¶
func (_e *MockEmailService_Expecter) GetSendGridClient() *MockEmailService_GetSendGridClient_Call
GetSendGridClient is a helper method to define mock.On call
func (*MockEmailService_Expecter) Send ¶
func (_e *MockEmailService_Expecter) Send(ctx interface{}, req interface{}) *MockEmailService_Send_Call
Send is a helper method to define mock.On call
- ctx
- req
type MockEmailService_GetSendGridClient_Call ¶
MockEmailService_GetSendGridClient_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSendGridClient'
func (*MockEmailService_GetSendGridClient_Call) Return ¶
func (_c *MockEmailService_GetSendGridClient_Call) Return(client *sendgrid.Client) *MockEmailService_GetSendGridClient_Call
func (*MockEmailService_GetSendGridClient_Call) Run ¶
func (_c *MockEmailService_GetSendGridClient_Call) Run(run func()) *MockEmailService_GetSendGridClient_Call
func (*MockEmailService_GetSendGridClient_Call) RunAndReturn ¶
func (_c *MockEmailService_GetSendGridClient_Call) RunAndReturn(run func() *sendgrid.Client) *MockEmailService_GetSendGridClient_Call
type MockEmailService_Send_Call ¶
MockEmailService_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send'
func (*MockEmailService_Send_Call) Return ¶
func (_c *MockEmailService_Send_Call) Return(err error) *MockEmailService_Send_Call
func (*MockEmailService_Send_Call) Run ¶
func (_c *MockEmailService_Send_Call) Run(run func(ctx context.Context, req *models.EmailNotificationRequest)) *MockEmailService_Send_Call
func (*MockEmailService_Send_Call) RunAndReturn ¶
func (_c *MockEmailService_Send_Call) RunAndReturn(run func(ctx context.Context, req *models.EmailNotificationRequest) error) *MockEmailService_Send_Call