-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchangestreaminterface_test.go
174 lines (138 loc) · 4.89 KB
/
changestreaminterface_test.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// Code generated by mockery. DO NOT EDIT.
package queue
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// ChangeStreamInterfaceMock is an autogenerated mock type for the ChangeStreamInterface type
type ChangeStreamInterfaceMock struct {
mock.Mock
}
type ChangeStreamInterfaceMock_Expecter struct {
mock *mock.Mock
}
func (_m *ChangeStreamInterfaceMock) EXPECT() *ChangeStreamInterfaceMock_Expecter {
return &ChangeStreamInterfaceMock_Expecter{mock: &_m.Mock}
}
// Close provides a mock function with given fields: ctx
func (_m *ChangeStreamInterfaceMock) Close(ctx context.Context) error {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for Close")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(ctx)
} else {
r0 = ret.Error(0)
}
return r0
}
// ChangeStreamInterfaceMock_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
type ChangeStreamInterfaceMock_Close_Call struct {
*mock.Call
}
// Close is a helper method to define mock.On call
// - ctx context.Context
func (_e *ChangeStreamInterfaceMock_Expecter) Close(ctx interface{}) *ChangeStreamInterfaceMock_Close_Call {
return &ChangeStreamInterfaceMock_Close_Call{Call: _e.mock.On("Close", ctx)}
}
func (_c *ChangeStreamInterfaceMock_Close_Call) Run(run func(ctx context.Context)) *ChangeStreamInterfaceMock_Close_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *ChangeStreamInterfaceMock_Close_Call) Return(_a0 error) *ChangeStreamInterfaceMock_Close_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *ChangeStreamInterfaceMock_Close_Call) RunAndReturn(run func(context.Context) error) *ChangeStreamInterfaceMock_Close_Call {
_c.Call.Return(run)
return _c
}
// Decode provides a mock function with given fields: v
func (_m *ChangeStreamInterfaceMock) Decode(v interface{}) error {
ret := _m.Called(v)
if len(ret) == 0 {
panic("no return value specified for Decode")
}
var r0 error
if rf, ok := ret.Get(0).(func(interface{}) error); ok {
r0 = rf(v)
} else {
r0 = ret.Error(0)
}
return r0
}
// ChangeStreamInterfaceMock_Decode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Decode'
type ChangeStreamInterfaceMock_Decode_Call struct {
*mock.Call
}
// Decode is a helper method to define mock.On call
// - v interface{}
func (_e *ChangeStreamInterfaceMock_Expecter) Decode(v interface{}) *ChangeStreamInterfaceMock_Decode_Call {
return &ChangeStreamInterfaceMock_Decode_Call{Call: _e.mock.On("Decode", v)}
}
func (_c *ChangeStreamInterfaceMock_Decode_Call) Run(run func(v interface{})) *ChangeStreamInterfaceMock_Decode_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(interface{}))
})
return _c
}
func (_c *ChangeStreamInterfaceMock_Decode_Call) Return(_a0 error) *ChangeStreamInterfaceMock_Decode_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *ChangeStreamInterfaceMock_Decode_Call) RunAndReturn(run func(interface{}) error) *ChangeStreamInterfaceMock_Decode_Call {
_c.Call.Return(run)
return _c
}
// Next provides a mock function with given fields: ctx
func (_m *ChangeStreamInterfaceMock) Next(ctx context.Context) bool {
ret := _m.Called(ctx)
if len(ret) == 0 {
panic("no return value specified for Next")
}
var r0 bool
if rf, ok := ret.Get(0).(func(context.Context) bool); ok {
r0 = rf(ctx)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// ChangeStreamInterfaceMock_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next'
type ChangeStreamInterfaceMock_Next_Call struct {
*mock.Call
}
// Next is a helper method to define mock.On call
// - ctx context.Context
func (_e *ChangeStreamInterfaceMock_Expecter) Next(ctx interface{}) *ChangeStreamInterfaceMock_Next_Call {
return &ChangeStreamInterfaceMock_Next_Call{Call: _e.mock.On("Next", ctx)}
}
func (_c *ChangeStreamInterfaceMock_Next_Call) Run(run func(ctx context.Context)) *ChangeStreamInterfaceMock_Next_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context))
})
return _c
}
func (_c *ChangeStreamInterfaceMock_Next_Call) Return(_a0 bool) *ChangeStreamInterfaceMock_Next_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *ChangeStreamInterfaceMock_Next_Call) RunAndReturn(run func(context.Context) bool) *ChangeStreamInterfaceMock_Next_Call {
_c.Call.Return(run)
return _c
}
// NewChangeStreamInterfaceMock creates a new instance of ChangeStreamInterfaceMock. 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 NewChangeStreamInterfaceMock(t interface {
mock.TestingT
Cleanup(func())
}) *ChangeStreamInterfaceMock {
mock := &ChangeStreamInterfaceMock{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}