-
Notifications
You must be signed in to change notification settings - Fork 319
/
mock_trie.go
310 lines (264 loc) · 9.33 KB
/
mock_trie.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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
// Code generated by MockGen. DO NOT EDIT.
// Source: ./db/trie/trie.go
// Package mock_trie is a generated GoMock package.
package mock_trie
import (
context "context"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockIterator is a mock of Iterator interface
type MockIterator struct {
ctrl *gomock.Controller
recorder *MockIteratorMockRecorder
}
// MockIteratorMockRecorder is the mock recorder for MockIterator
type MockIteratorMockRecorder struct {
mock *MockIterator
}
// NewMockIterator creates a new mock instance
func NewMockIterator(ctrl *gomock.Controller) *MockIterator {
mock := &MockIterator{ctrl: ctrl}
mock.recorder = &MockIteratorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockIterator) EXPECT() *MockIteratorMockRecorder {
return m.recorder
}
// Next mocks base method
func (m *MockIterator) Next() ([]byte, []byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Next")
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].([]byte)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Next indicates an expected call of Next
func (mr *MockIteratorMockRecorder) Next() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Next", reflect.TypeOf((*MockIterator)(nil).Next))
}
// MockTrie is a mock of Trie interface
type MockTrie struct {
ctrl *gomock.Controller
recorder *MockTrieMockRecorder
}
// MockTrieMockRecorder is the mock recorder for MockTrie
type MockTrieMockRecorder struct {
mock *MockTrie
}
// NewMockTrie creates a new mock instance
func NewMockTrie(ctrl *gomock.Controller) *MockTrie {
mock := &MockTrie{ctrl: ctrl}
mock.recorder = &MockTrieMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockTrie) EXPECT() *MockTrieMockRecorder {
return m.recorder
}
// Start mocks base method
func (m *MockTrie) Start(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start
func (mr *MockTrieMockRecorder) Start(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockTrie)(nil).Start), arg0)
}
// Stop mocks base method
func (m *MockTrie) Stop(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Stop", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Stop indicates an expected call of Stop
func (mr *MockTrieMockRecorder) Stop(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTrie)(nil).Stop), arg0)
}
// Upsert mocks base method
func (m *MockTrie) Upsert(arg0, arg1 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Upsert", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Upsert indicates an expected call of Upsert
func (mr *MockTrieMockRecorder) Upsert(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upsert", reflect.TypeOf((*MockTrie)(nil).Upsert), arg0, arg1)
}
// Get mocks base method
func (m *MockTrie) Get(arg0 []byte) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get
func (mr *MockTrieMockRecorder) Get(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTrie)(nil).Get), arg0)
}
// Delete mocks base method
func (m *MockTrie) Delete(arg0 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete
func (mr *MockTrieMockRecorder) Delete(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockTrie)(nil).Delete), arg0)
}
// RootHash mocks base method
func (m *MockTrie) RootHash() ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RootHash")
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RootHash indicates an expected call of RootHash
func (mr *MockTrieMockRecorder) RootHash() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHash", reflect.TypeOf((*MockTrie)(nil).RootHash))
}
// SetRootHash mocks base method
func (m *MockTrie) SetRootHash(arg0 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetRootHash", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetRootHash indicates an expected call of SetRootHash
func (mr *MockTrieMockRecorder) SetRootHash(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRootHash", reflect.TypeOf((*MockTrie)(nil).SetRootHash), arg0)
}
// IsEmpty mocks base method
func (m *MockTrie) IsEmpty() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsEmpty")
ret0, _ := ret[0].(bool)
return ret0
}
// IsEmpty indicates an expected call of IsEmpty
func (mr *MockTrieMockRecorder) IsEmpty() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsEmpty", reflect.TypeOf((*MockTrie)(nil).IsEmpty))
}
// MockTwoLayerTrie is a mock of TwoLayerTrie interface
type MockTwoLayerTrie struct {
ctrl *gomock.Controller
recorder *MockTwoLayerTrieMockRecorder
}
// MockTwoLayerTrieMockRecorder is the mock recorder for MockTwoLayerTrie
type MockTwoLayerTrieMockRecorder struct {
mock *MockTwoLayerTrie
}
// NewMockTwoLayerTrie creates a new mock instance
func NewMockTwoLayerTrie(ctrl *gomock.Controller) *MockTwoLayerTrie {
mock := &MockTwoLayerTrie{ctrl: ctrl}
mock.recorder = &MockTwoLayerTrieMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockTwoLayerTrie) EXPECT() *MockTwoLayerTrieMockRecorder {
return m.recorder
}
// Start mocks base method
func (m *MockTwoLayerTrie) Start(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Start", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Start indicates an expected call of Start
func (mr *MockTwoLayerTrieMockRecorder) Start(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockTwoLayerTrie)(nil).Start), arg0)
}
// Stop mocks base method
func (m *MockTwoLayerTrie) Stop(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Stop", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// Stop indicates an expected call of Stop
func (mr *MockTwoLayerTrieMockRecorder) Stop(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockTwoLayerTrie)(nil).Stop), arg0)
}
// RootHash mocks base method
func (m *MockTwoLayerTrie) RootHash() ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RootHash")
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// RootHash indicates an expected call of RootHash
func (mr *MockTwoLayerTrieMockRecorder) RootHash() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RootHash", reflect.TypeOf((*MockTwoLayerTrie)(nil).RootHash))
}
// SetRootHash mocks base method
func (m *MockTwoLayerTrie) SetRootHash(arg0 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetRootHash", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetRootHash indicates an expected call of SetRootHash
func (mr *MockTwoLayerTrieMockRecorder) SetRootHash(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetRootHash", reflect.TypeOf((*MockTwoLayerTrie)(nil).SetRootHash), arg0)
}
// Get mocks base method
func (m *MockTwoLayerTrie) Get(arg0, arg1 []byte) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", arg0, arg1)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get
func (mr *MockTwoLayerTrieMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockTwoLayerTrie)(nil).Get), arg0, arg1)
}
// Upsert mocks base method
func (m *MockTwoLayerTrie) Upsert(arg0, arg1, arg2 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Upsert", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// Upsert indicates an expected call of Upsert
func (mr *MockTwoLayerTrieMockRecorder) Upsert(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Upsert", reflect.TypeOf((*MockTwoLayerTrie)(nil).Upsert), arg0, arg1, arg2)
}
// Delete mocks base method
func (m *MockTwoLayerTrie) Delete(arg0, arg1 []byte) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete
func (mr *MockTwoLayerTrieMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockTwoLayerTrie)(nil).Delete), arg0, arg1)
}