-
Notifications
You must be signed in to change notification settings - Fork 227
/
Copy pathmock_sender.go
79 lines (62 loc) · 2.01 KB
/
mock_sender.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
// Code generated by mockery v2.43.2. DO NOT EDIT.
package lark
import mock "github.com/stretchr/testify/mock"
// mocksender is an autogenerated mock type for the sender type
type mocksender struct {
mock.Mock
}
type mocksender_Expecter struct {
mock *mock.Mock
}
func (_m *mocksender) EXPECT() *mocksender_Expecter {
return &mocksender_Expecter{mock: &_m.Mock}
}
// Send provides a mock function with given fields: subject, message
func (_m *mocksender) Send(subject string, message string) error {
ret := _m.Called(subject, message)
if len(ret) == 0 {
panic("no return value specified for Send")
}
var r0 error
if rf, ok := ret.Get(0).(func(string, string) error); ok {
r0 = rf(subject, message)
} else {
r0 = ret.Error(0)
}
return r0
}
// mocksender_Send_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Send'
type mocksender_Send_Call struct {
*mock.Call
}
// Send is a helper method to define mock.On call
// - subject string
// - message string
func (_e *mocksender_Expecter) Send(subject interface{}, message interface{}) *mocksender_Send_Call {
return &mocksender_Send_Call{Call: _e.mock.On("Send", subject, message)}
}
func (_c *mocksender_Send_Call) Run(run func(subject string, message string)) *mocksender_Send_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string), args[1].(string))
})
return _c
}
func (_c *mocksender_Send_Call) Return(_a0 error) *mocksender_Send_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *mocksender_Send_Call) RunAndReturn(run func(string, string) error) *mocksender_Send_Call {
_c.Call.Return(run)
return _c
}
// newMocksender creates a new instance of mocksender. 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 newMocksender(t interface {
mock.TestingT
Cleanup(func())
}) *mocksender {
mock := &mocksender{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}