-
Notifications
You must be signed in to change notification settings - Fork 270
Expand file tree
/
Copy pathmock_plivo_msg_client.go
More file actions
99 lines (83 loc) · 3.08 KB
/
mock_plivo_msg_client.go
File metadata and controls
99 lines (83 loc) · 3.08 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
// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify
package plivo
import (
"github.com/plivo/plivo-go/v7"
mock "github.com/stretchr/testify/mock"
)
// newMockplivoMsgClient creates a new instance of mockplivoMsgClient. 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 newMockplivoMsgClient(t interface {
mock.TestingT
Cleanup(func())
}) *mockplivoMsgClient {
mock := &mockplivoMsgClient{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}
// mockplivoMsgClient is an autogenerated mock type for the plivoMsgClient type
type mockplivoMsgClient struct {
mock.Mock
}
type mockplivoMsgClient_Expecter struct {
mock *mock.Mock
}
func (_m *mockplivoMsgClient) EXPECT() *mockplivoMsgClient_Expecter {
return &mockplivoMsgClient_Expecter{mock: &_m.Mock}
}
// Create provides a mock function for the type mockplivoMsgClient
func (_mock *mockplivoMsgClient) Create(messageCreateParams plivo.MessageCreateParams) (*plivo.MessageCreateResponseBody, error) {
ret := _mock.Called(messageCreateParams)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 *plivo.MessageCreateResponseBody
var r1 error
if returnFunc, ok := ret.Get(0).(func(plivo.MessageCreateParams) (*plivo.MessageCreateResponseBody, error)); ok {
return returnFunc(messageCreateParams)
}
if returnFunc, ok := ret.Get(0).(func(plivo.MessageCreateParams) *plivo.MessageCreateResponseBody); ok {
r0 = returnFunc(messageCreateParams)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*plivo.MessageCreateResponseBody)
}
}
if returnFunc, ok := ret.Get(1).(func(plivo.MessageCreateParams) error); ok {
r1 = returnFunc(messageCreateParams)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// mockplivoMsgClient_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
type mockplivoMsgClient_Create_Call struct {
*mock.Call
}
// Create is a helper method to define mock.On call
// - messageCreateParams plivo.MessageCreateParams
func (_e *mockplivoMsgClient_Expecter) Create(messageCreateParams interface{}) *mockplivoMsgClient_Create_Call {
return &mockplivoMsgClient_Create_Call{Call: _e.mock.On("Create", messageCreateParams)}
}
func (_c *mockplivoMsgClient_Create_Call) Run(run func(messageCreateParams plivo.MessageCreateParams)) *mockplivoMsgClient_Create_Call {
_c.Call.Run(func(args mock.Arguments) {
var arg0 plivo.MessageCreateParams
if args[0] != nil {
arg0 = args[0].(plivo.MessageCreateParams)
}
run(
arg0,
)
})
return _c
}
func (_c *mockplivoMsgClient_Create_Call) Return(messageCreateResponseBody *plivo.MessageCreateResponseBody, err error) *mockplivoMsgClient_Create_Call {
_c.Call.Return(messageCreateResponseBody, err)
return _c
}
func (_c *mockplivoMsgClient_Create_Call) RunAndReturn(run func(messageCreateParams plivo.MessageCreateParams) (*plivo.MessageCreateResponseBody, error)) *mockplivoMsgClient_Create_Call {
_c.Call.Return(run)
return _c
}