mirror of
https://github.com/hanzoai/notify.git
synced 2026-10-30 15:04:32 +00:00
99 lines
3.0 KiB
Go
99 lines
3.0 KiB
Go
// Code generated by mockery v2.43.2. DO NOT EDIT.
|
|
|
|
package twilio
|
|
|
|
import (
|
|
url "net/url"
|
|
|
|
twilio_go "github.com/kevinburke/twilio-go"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// mocktwilioClient is an autogenerated mock type for the twilioClient type
|
|
type mocktwilioClient struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type mocktwilioClient_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *mocktwilioClient) EXPECT() *mocktwilioClient_Expecter {
|
|
return &mocktwilioClient_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// SendMessage provides a mock function with given fields: from, to, body, mediaURLs
|
|
func (_m *mocktwilioClient) SendMessage(from string, to string, body string, mediaURLs []*url.URL) (*twilio_go.Message, error) {
|
|
ret := _m.Called(from, to, body, mediaURLs)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SendMessage")
|
|
}
|
|
|
|
var r0 *twilio_go.Message
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, []*url.URL) (*twilio_go.Message, error)); ok {
|
|
return rf(from, to, body, mediaURLs)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, string, []*url.URL) *twilio_go.Message); ok {
|
|
r0 = rf(from, to, body, mediaURLs)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*twilio_go.Message)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, string, []*url.URL) error); ok {
|
|
r1 = rf(from, to, body, mediaURLs)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// mocktwilioClient_SendMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendMessage'
|
|
type mocktwilioClient_SendMessage_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// SendMessage is a helper method to define mock.On call
|
|
// - from string
|
|
// - to string
|
|
// - body string
|
|
// - mediaURLs []*url.URL
|
|
func (_e *mocktwilioClient_Expecter) SendMessage(from interface{}, to interface{}, body interface{}, mediaURLs interface{}) *mocktwilioClient_SendMessage_Call {
|
|
return &mocktwilioClient_SendMessage_Call{Call: _e.mock.On("SendMessage", from, to, body, mediaURLs)}
|
|
}
|
|
|
|
func (_c *mocktwilioClient_SendMessage_Call) Run(run func(from string, to string, body string, mediaURLs []*url.URL)) *mocktwilioClient_SendMessage_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string), args[2].(string), args[3].([]*url.URL))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *mocktwilioClient_SendMessage_Call) Return(_a0 *twilio_go.Message, _a1 error) *mocktwilioClient_SendMessage_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *mocktwilioClient_SendMessage_Call) RunAndReturn(run func(string, string, string, []*url.URL) (*twilio_go.Message, error)) *mocktwilioClient_SendMessage_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// newMocktwilioClient creates a new instance of mocktwilioClient. 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 newMocktwilioClient(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *mocktwilioClient {
|
|
mock := &mocktwilioClient{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|