mirror of
https://github.com/hanzoai/notify.git
synced 2026-10-30 15:04:32 +00:00
112 lines
3.6 KiB
Go
112 lines
3.6 KiB
Go
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
|
|
|
package amazonsns
|
|
|
|
import (
|
|
context "context"
|
|
|
|
sns "github.com/aws/aws-sdk-go-v2/service/sns"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// mocksnsSendMessageAPI is an autogenerated mock type for the snsSendMessageAPI type
|
|
type mocksnsSendMessageAPI struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type mocksnsSendMessageAPI_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *mocksnsSendMessageAPI) EXPECT() *mocksnsSendMessageAPI_Expecter {
|
|
return &mocksnsSendMessageAPI_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// SendMessage provides a mock function with given fields: ctx, params, optFns
|
|
func (_m *mocksnsSendMessageAPI) SendMessage(ctx context.Context, params *sns.PublishInput, optFns ...func(*sns.Options)) (*sns.PublishOutput, 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 SendMessage")
|
|
}
|
|
|
|
var r0 *sns.PublishOutput
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, *sns.PublishInput, ...func(*sns.Options)) (*sns.PublishOutput, error)); ok {
|
|
return rf(ctx, params, optFns...)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, *sns.PublishInput, ...func(*sns.Options)) *sns.PublishOutput); ok {
|
|
r0 = rf(ctx, params, optFns...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*sns.PublishOutput)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, *sns.PublishInput, ...func(*sns.Options)) error); ok {
|
|
r1 = rf(ctx, params, optFns...)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// mocksnsSendMessageAPI_SendMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMessage'
|
|
type mocksnsSendMessageAPI_SendMessage_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SendMessage is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - params *sns.PublishInput
|
|
// - optFns ...func(*sns.Options)
|
|
func (_e *mocksnsSendMessageAPI_Expecter) SendMessage(ctx interface{}, params interface{}, optFns ...interface{}) *mocksnsSendMessageAPI_SendMessage_Call {
|
|
return &mocksnsSendMessageAPI_SendMessage_Call{Call: _e.mock.On("SendMessage",
|
|
append([]interface{}{ctx, params}, optFns...)...)}
|
|
}
|
|
|
|
func (_c *mocksnsSendMessageAPI_SendMessage_Call) Run(run func(ctx context.Context, params *sns.PublishInput, optFns ...func(*sns.Options))) *mocksnsSendMessageAPI_SendMessage_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]func(*sns.Options), len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(func(*sns.Options))
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(*sns.PublishInput), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *mocksnsSendMessageAPI_SendMessage_Call) Return(_a0 *sns.PublishOutput, _a1 error) *mocksnsSendMessageAPI_SendMessage_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *mocksnsSendMessageAPI_SendMessage_Call) RunAndReturn(run func(context.Context, *sns.PublishInput, ...func(*sns.Options)) (*sns.PublishOutput, error)) *mocksnsSendMessageAPI_SendMessage_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// newMocksnsSendMessageAPI creates a new instance of mocksnsSendMessageAPI. 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 newMocksnsSendMessageAPI(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *mocksnsSendMessageAPI {
|
|
mock := &mocksnsSendMessageAPI{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|