-
Notifications
You must be signed in to change notification settings - Fork 19
/
mocks.go
292 lines (247 loc) · 8.98 KB
/
mocks.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
// Code generated by MockGen. DO NOT EDIT.
// Source: code.vegaprotocol.io/vega/datanode/broker (interfaces: Subscriber,TestInterface,ChainInfoI)
// Package mocks is a generated GoMock package.
package mocks
import (
context "context"
reflect "reflect"
events "code.vegaprotocol.io/vega/core/events"
broker "code.vegaprotocol.io/vega/datanode/broker"
gomock "github.com/golang/mock/gomock"
)
// MockSubscriber is a mock of Subscriber interface.
type MockSubscriber struct {
ctrl *gomock.Controller
recorder *MockSubscriberMockRecorder
}
// MockSubscriberMockRecorder is the mock recorder for MockSubscriber.
type MockSubscriberMockRecorder struct {
mock *MockSubscriber
}
// NewMockSubscriber creates a new mock instance.
func NewMockSubscriber(ctrl *gomock.Controller) *MockSubscriber {
mock := &MockSubscriber{ctrl: ctrl}
mock.recorder = &MockSubscriberMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSubscriber) EXPECT() *MockSubscriberMockRecorder {
return m.recorder
}
// Ack mocks base method.
func (m *MockSubscriber) Ack() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Ack")
ret0, _ := ret[0].(bool)
return ret0
}
// Ack indicates an expected call of Ack.
func (mr *MockSubscriberMockRecorder) Ack() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Ack", reflect.TypeOf((*MockSubscriber)(nil).Ack))
}
// C mocks base method.
func (m *MockSubscriber) C() chan<- []events.Event {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "C")
ret0, _ := ret[0].(chan<- []events.Event)
return ret0
}
// C indicates an expected call of C.
func (mr *MockSubscriberMockRecorder) C() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "C", reflect.TypeOf((*MockSubscriber)(nil).C))
}
// Closed mocks base method.
func (m *MockSubscriber) Closed() <-chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Closed")
ret0, _ := ret[0].(<-chan struct{})
return ret0
}
// Closed indicates an expected call of Closed.
func (mr *MockSubscriberMockRecorder) Closed() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Closed", reflect.TypeOf((*MockSubscriber)(nil).Closed))
}
// ID mocks base method.
func (m *MockSubscriber) ID() int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ID")
ret0, _ := ret[0].(int)
return ret0
}
// ID indicates an expected call of ID.
func (mr *MockSubscriberMockRecorder) ID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockSubscriber)(nil).ID))
}
// Push mocks base method.
func (m *MockSubscriber) Push(arg0 ...events.Event) {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range arg0 {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "Push", varargs...)
}
// Push indicates an expected call of Push.
func (mr *MockSubscriberMockRecorder) Push(arg0 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Push", reflect.TypeOf((*MockSubscriber)(nil).Push), arg0...)
}
// SetID mocks base method.
func (m *MockSubscriber) SetID(arg0 int) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "SetID", arg0)
}
// SetID indicates an expected call of SetID.
func (mr *MockSubscriberMockRecorder) SetID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetID", reflect.TypeOf((*MockSubscriber)(nil).SetID), arg0)
}
// Skip mocks base method.
func (m *MockSubscriber) Skip() <-chan struct{} {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Skip")
ret0, _ := ret[0].(<-chan struct{})
return ret0
}
// Skip indicates an expected call of Skip.
func (mr *MockSubscriberMockRecorder) Skip() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Skip", reflect.TypeOf((*MockSubscriber)(nil).Skip))
}
// Types mocks base method.
func (m *MockSubscriber) Types() []events.Type {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Types")
ret0, _ := ret[0].([]events.Type)
return ret0
}
// Types indicates an expected call of Types.
func (mr *MockSubscriberMockRecorder) Types() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Types", reflect.TypeOf((*MockSubscriber)(nil).Types))
}
// MockTestInterface is a mock of TestInterface interface.
type MockTestInterface struct {
ctrl *gomock.Controller
recorder *MockTestInterfaceMockRecorder
}
// MockTestInterfaceMockRecorder is the mock recorder for MockTestInterface.
type MockTestInterfaceMockRecorder struct {
mock *MockTestInterface
}
// NewMockTestInterface creates a new mock instance.
func NewMockTestInterface(ctrl *gomock.Controller) *MockTestInterface {
mock := &MockTestInterface{ctrl: ctrl}
mock.recorder = &MockTestInterfaceMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTestInterface) EXPECT() *MockTestInterfaceMockRecorder {
return m.recorder
}
// Receive mocks base method.
func (m *MockTestInterface) Receive(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Receive", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Receive indicates an expected call of Receive.
func (mr *MockTestInterfaceMockRecorder) Receive(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Receive", reflect.TypeOf((*MockTestInterface)(nil).Receive), arg0)
}
// Send mocks base method.
func (m *MockTestInterface) Send(arg0 events.Event) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Send", arg0)
}
// Send indicates an expected call of Send.
func (mr *MockTestInterfaceMockRecorder) Send(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockTestInterface)(nil).Send), arg0)
}
// Subscribe mocks base method.
func (m *MockTestInterface) Subscribe(arg0 broker.Subscriber) int {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Subscribe", arg0)
ret0, _ := ret[0].(int)
return ret0
}
// Subscribe indicates an expected call of Subscribe.
func (mr *MockTestInterfaceMockRecorder) Subscribe(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Subscribe", reflect.TypeOf((*MockTestInterface)(nil).Subscribe), arg0)
}
// SubscribeBatch mocks base method.
func (m *MockTestInterface) SubscribeBatch(arg0 ...broker.Subscriber) {
m.ctrl.T.Helper()
varargs := []interface{}{}
for _, a := range arg0 {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "SubscribeBatch", varargs...)
}
// SubscribeBatch indicates an expected call of SubscribeBatch.
func (mr *MockTestInterfaceMockRecorder) SubscribeBatch(arg0 ...interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeBatch", reflect.TypeOf((*MockTestInterface)(nil).SubscribeBatch), arg0...)
}
// Unsubscribe mocks base method.
func (m *MockTestInterface) Unsubscribe(arg0 int) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Unsubscribe", arg0)
}
// Unsubscribe indicates an expected call of Unsubscribe.
func (mr *MockTestInterfaceMockRecorder) Unsubscribe(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsubscribe", reflect.TypeOf((*MockTestInterface)(nil).Unsubscribe), arg0)
}
// MockChainInfoI is a mock of ChainInfoI interface.
type MockChainInfoI struct {
ctrl *gomock.Controller
recorder *MockChainInfoIMockRecorder
}
// MockChainInfoIMockRecorder is the mock recorder for MockChainInfoI.
type MockChainInfoIMockRecorder struct {
mock *MockChainInfoI
}
// NewMockChainInfoI creates a new mock instance.
func NewMockChainInfoI(ctrl *gomock.Controller) *MockChainInfoI {
mock := &MockChainInfoI{ctrl: ctrl}
mock.recorder = &MockChainInfoIMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockChainInfoI) EXPECT() *MockChainInfoIMockRecorder {
return m.recorder
}
// GetChainID mocks base method.
func (m *MockChainInfoI) GetChainID() (string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetChainID")
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetChainID indicates an expected call of GetChainID.
func (mr *MockChainInfoIMockRecorder) GetChainID() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChainID", reflect.TypeOf((*MockChainInfoI)(nil).GetChainID))
}
// SetChainID mocks base method.
func (m *MockChainInfoI) SetChainID(arg0 string) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetChainID", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetChainID indicates an expected call of SetChainID.
func (mr *MockChainInfoIMockRecorder) SetChainID(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetChainID", reflect.TypeOf((*MockChainInfoI)(nil).SetChainID), arg0)
}