-
Notifications
You must be signed in to change notification settings - Fork 218
/
mock_ses_client.go
111 lines (92 loc) · 3.4 KB
/
mock_ses_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Code generated by mockery v2.43.2. DO NOT EDIT.
package amazonses
import (
context "context"
ses "github.com/aws/aws-sdk-go-v2/service/ses"
mock "github.com/stretchr/testify/mock"
)
// mocksesClient is an autogenerated mock type for the sesClient type
type mocksesClient struct {
mock.Mock
}
type mocksesClient_Expecter struct {
mock *mock.Mock
}
func (_m *mocksesClient) EXPECT() *mocksesClient_Expecter {
return &mocksesClient_Expecter{mock: &_m.Mock}
}
// SendEmail provides a mock function with given fields: ctx, params, optFns
func (_m *mocksesClient) SendEmail(ctx context.Context, params *ses.SendEmailInput, optFns ...func(*ses.Options)) (*ses.SendEmailOutput, error) {
_va := make([]interface{}, len(optFns))
for _i := range optFns {
_va[_i] = optFns[_i]
}
var _ca []interface{}
_ca = append(_ca, ctx, params)
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for SendEmail")
}
var r0 *ses.SendEmailOutput
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, *ses.SendEmailInput, ...func(*ses.Options)) (*ses.SendEmailOutput, error)); ok {
return rf(ctx, params, optFns...)
}
if rf, ok := ret.Get(0).(func(context.Context, *ses.SendEmailInput, ...func(*ses.Options)) *ses.SendEmailOutput); ok {
r0 = rf(ctx, params, optFns...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ses.SendEmailOutput)
}
}
if rf, ok := ret.Get(1).(func(context.Context, *ses.SendEmailInput, ...func(*ses.Options)) error); ok {
r1 = rf(ctx, params, optFns...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// mocksesClient_SendEmail_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendEmail'
type mocksesClient_SendEmail_Call struct {
*mock.Call
}
// SendEmail is a helper method to define mock.On call
// - ctx context.Context
// - params *ses.SendEmailInput
// - optFns ...func(*ses.Options)
func (_e *mocksesClient_Expecter) SendEmail(ctx interface{}, params interface{}, optFns ...interface{}) *mocksesClient_SendEmail_Call {
return &mocksesClient_SendEmail_Call{Call: _e.mock.On("SendEmail",
append([]interface{}{ctx, params}, optFns...)...)}
}
func (_c *mocksesClient_SendEmail_Call) Run(run func(ctx context.Context, params *ses.SendEmailInput, optFns ...func(*ses.Options))) *mocksesClient_SendEmail_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]func(*ses.Options), len(args)-2)
for i, a := range args[2:] {
if a != nil {
variadicArgs[i] = a.(func(*ses.Options))
}
}
run(args[0].(context.Context), args[1].(*ses.SendEmailInput), variadicArgs...)
})
return _c
}
func (_c *mocksesClient_SendEmail_Call) Return(_a0 *ses.SendEmailOutput, _a1 error) *mocksesClient_SendEmail_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *mocksesClient_SendEmail_Call) RunAndReturn(run func(context.Context, *ses.SendEmailInput, ...func(*ses.Options)) (*ses.SendEmailOutput, error)) *mocksesClient_SendEmail_Call {
_c.Call.Return(run)
return _c
}
// newMocksesClient creates a new instance of mocksesClient. 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 newMocksesClient(t interface {
mock.TestingT
Cleanup(func())
}) *mocksesClient {
mock := &mocksesClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}