-
Notifications
You must be signed in to change notification settings - Fork 282
Expand file tree
/
Copy pathmock_twilio_client.go
More file actions
119 lines (102 loc) · 3.35 KB
/
Copy pathmock_twilio_client.go
File metadata and controls
119 lines (102 loc) · 3.35 KB
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
112
113
114
115
116
117
118
119
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package twilio
import (
"net/url"
"github.com/kevinburke/twilio-go"
mock "github.com/stretchr/testify/mock"
)
// 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
}
// 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 for the type mocktwilioClient
func (_mock *mocktwilioClient) SendMessage(from string, to string, body string, mediaURLs []*url.URL) (*twilio.Message, error) {
ret := _mock.Called(from, to, body, mediaURLs)
if len(ret) == 0 {
panic("no return value specified for SendMessage")
}
var r0 *twilio.Message
var r1 error
if returnFunc, ok := ret.Get(0).(func(string, string, string, []*url.URL) (*twilio.Message, error)); ok {
return returnFunc(from, to, body, mediaURLs)
}
if returnFunc, ok := ret.Get(0).(func(string, string, string, []*url.URL) *twilio.Message); ok {
r0 = returnFunc(from, to, body, mediaURLs)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*twilio.Message)
}
}
if returnFunc, ok := ret.Get(1).(func(string, string, string, []*url.URL) error); ok {
r1 = returnFunc(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) {
var arg0 string
if args[0] != nil {
arg0 = args[0].(string)
}
var arg1 string
if args[1] != nil {
arg1 = args[1].(string)
}
var arg2 string
if args[2] != nil {
arg2 = args[2].(string)
}
var arg3 []*url.URL
if args[3] != nil {
arg3 = args[3].([]*url.URL)
}
run(
arg0,
arg1,
arg2,
arg3,
)
})
return _c
}
func (_c *mocktwilioClient_SendMessage_Call) Return(message *twilio.Message, err error) *mocktwilioClient_SendMessage_Call {
_c.Call.Return(message, err)
return _c
}
func (_c *mocktwilioClient_SendMessage_Call) RunAndReturn(run func(from string, to string, body string, mediaURLs []*url.URL) (*twilio.Message, error)) *mocktwilioClient_SendMessage_Call {
_c.Call.Return(run)
return _c
}