-
Notifications
You must be signed in to change notification settings - Fork 220
/
mock_call_creator.go
107 lines (89 loc) · 2.79 KB
/
mock_call_creator.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
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
// Code generated by mockery v2.43.2. DO NOT EDIT.
package googlechat
import (
mock "github.com/stretchr/testify/mock"
chat "google.golang.org/api/chat/v1"
googleapi "google.golang.org/api/googleapi"
)
// mockcallCreator is an autogenerated mock type for the callCreator type
type mockcallCreator struct {
mock.Mock
}
type mockcallCreator_Expecter struct {
mock *mock.Mock
}
func (_m *mockcallCreator) EXPECT() *mockcallCreator_Expecter {
return &mockcallCreator_Expecter{mock: &_m.Mock}
}
// Do provides a mock function with given fields: _a0
func (_m *mockcallCreator) Do(_a0 ...googleapi.CallOption) (*chat.Message, error) {
_va := make([]interface{}, len(_a0))
for _i := range _a0 {
_va[_i] = _a0[_i]
}
var _ca []interface{}
_ca = append(_ca, _va...)
ret := _m.Called(_ca...)
if len(ret) == 0 {
panic("no return value specified for Do")
}
var r0 *chat.Message
var r1 error
if rf, ok := ret.Get(0).(func(...googleapi.CallOption) (*chat.Message, error)); ok {
return rf(_a0...)
}
if rf, ok := ret.Get(0).(func(...googleapi.CallOption) *chat.Message); ok {
r0 = rf(_a0...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*chat.Message)
}
}
if rf, ok := ret.Get(1).(func(...googleapi.CallOption) error); ok {
r1 = rf(_a0...)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// mockcallCreator_Do_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Do'
type mockcallCreator_Do_Call struct {
*mock.Call
}
// Do is a helper method to define mock.On call
// - _a0 ...googleapi.CallOption
func (_e *mockcallCreator_Expecter) Do(_a0 ...interface{}) *mockcallCreator_Do_Call {
return &mockcallCreator_Do_Call{Call: _e.mock.On("Do",
append([]interface{}{}, _a0...)...)}
}
func (_c *mockcallCreator_Do_Call) Run(run func(_a0 ...googleapi.CallOption)) *mockcallCreator_Do_Call {
_c.Call.Run(func(args mock.Arguments) {
variadicArgs := make([]googleapi.CallOption, len(args)-0)
for i, a := range args[0:] {
if a != nil {
variadicArgs[i] = a.(googleapi.CallOption)
}
}
run(variadicArgs...)
})
return _c
}
func (_c *mockcallCreator_Do_Call) Return(_a0 *chat.Message, _a1 error) *mockcallCreator_Do_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *mockcallCreator_Do_Call) RunAndReturn(run func(...googleapi.CallOption) (*chat.Message, error)) *mockcallCreator_Do_Call {
_c.Call.Return(run)
return _c
}
// newMockcallCreator creates a new instance of mockcallCreator. 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 newMockcallCreator(t interface {
mock.TestingT
Cleanup(func())
}) *mockcallCreator {
mock := &mockcallCreator{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}