forked from okx/xlayer-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock_l1_rollup_consumer_interface.go
204 lines (164 loc) · 7.02 KB
/
mock_l1_rollup_consumer_interface.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
// Code generated by mockery. DO NOT EDIT.
package l1_parallel_sync
import (
context "context"
state "github.com/0xPolygonHermez/zkevm-node/state"
mock "github.com/stretchr/testify/mock"
)
// l1RollupConsumerInterfaceMock is an autogenerated mock type for the l1RollupConsumerInterface type
type l1RollupConsumerInterfaceMock struct {
mock.Mock
}
type l1RollupConsumerInterfaceMock_Expecter struct {
mock *mock.Mock
}
func (_m *l1RollupConsumerInterfaceMock) EXPECT() *l1RollupConsumerInterfaceMock_Expecter {
return &l1RollupConsumerInterfaceMock_Expecter{mock: &_m.Mock}
}
// GetLastEthBlockSynced provides a mock function with given fields:
func (_m *l1RollupConsumerInterfaceMock) GetLastEthBlockSynced() (state.Block, bool) {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for GetLastEthBlockSynced")
}
var r0 state.Block
var r1 bool
if rf, ok := ret.Get(0).(func() (state.Block, bool)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() state.Block); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(state.Block)
}
if rf, ok := ret.Get(1).(func() bool); ok {
r1 = rf()
} else {
r1 = ret.Get(1).(bool)
}
return r0, r1
}
// l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetLastEthBlockSynced'
type l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call struct {
*mock.Call
}
// GetLastEthBlockSynced is a helper method to define mock.On call
func (_e *l1RollupConsumerInterfaceMock_Expecter) GetLastEthBlockSynced() *l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call {
return &l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call{Call: _e.mock.On("GetLastEthBlockSynced")}
}
func (_c *l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call) Run(run func()) *l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call) Return(_a0 state.Block, _a1 bool) *l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call) RunAndReturn(run func() (state.Block, bool)) *l1RollupConsumerInterfaceMock_GetLastEthBlockSynced_Call {
_c.Call.Return(run)
return _c
}
// Reset provides a mock function with given fields: startingBlockNumber
func (_m *l1RollupConsumerInterfaceMock) Reset(startingBlockNumber uint64) {
_m.Called(startingBlockNumber)
}
// l1RollupConsumerInterfaceMock_Reset_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reset'
type l1RollupConsumerInterfaceMock_Reset_Call struct {
*mock.Call
}
// Reset is a helper method to define mock.On call
// - startingBlockNumber uint64
func (_e *l1RollupConsumerInterfaceMock_Expecter) Reset(startingBlockNumber interface{}) *l1RollupConsumerInterfaceMock_Reset_Call {
return &l1RollupConsumerInterfaceMock_Reset_Call{Call: _e.mock.On("Reset", startingBlockNumber)}
}
func (_c *l1RollupConsumerInterfaceMock_Reset_Call) Run(run func(startingBlockNumber uint64)) *l1RollupConsumerInterfaceMock_Reset_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(uint64))
})
return _c
}
func (_c *l1RollupConsumerInterfaceMock_Reset_Call) Return() *l1RollupConsumerInterfaceMock_Reset_Call {
_c.Call.Return()
return _c
}
func (_c *l1RollupConsumerInterfaceMock_Reset_Call) RunAndReturn(run func(uint64)) *l1RollupConsumerInterfaceMock_Reset_Call {
_c.Call.Return(run)
return _c
}
// Start provides a mock function with given fields: ctx, lastEthBlockSynced
func (_m *l1RollupConsumerInterfaceMock) Start(ctx context.Context, lastEthBlockSynced *state.Block) error {
ret := _m.Called(ctx, lastEthBlockSynced)
if len(ret) == 0 {
panic("no return value specified for Start")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, *state.Block) error); ok {
r0 = rf(ctx, lastEthBlockSynced)
} else {
r0 = ret.Error(0)
}
return r0
}
// l1RollupConsumerInterfaceMock_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
type l1RollupConsumerInterfaceMock_Start_Call struct {
*mock.Call
}
// Start is a helper method to define mock.On call
// - ctx context.Context
// - lastEthBlockSynced *state.Block
func (_e *l1RollupConsumerInterfaceMock_Expecter) Start(ctx interface{}, lastEthBlockSynced interface{}) *l1RollupConsumerInterfaceMock_Start_Call {
return &l1RollupConsumerInterfaceMock_Start_Call{Call: _e.mock.On("Start", ctx, lastEthBlockSynced)}
}
func (_c *l1RollupConsumerInterfaceMock_Start_Call) Run(run func(ctx context.Context, lastEthBlockSynced *state.Block)) *l1RollupConsumerInterfaceMock_Start_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(*state.Block))
})
return _c
}
func (_c *l1RollupConsumerInterfaceMock_Start_Call) Return(_a0 error) *l1RollupConsumerInterfaceMock_Start_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *l1RollupConsumerInterfaceMock_Start_Call) RunAndReturn(run func(context.Context, *state.Block) error) *l1RollupConsumerInterfaceMock_Start_Call {
_c.Call.Return(run)
return _c
}
// StopAfterProcessChannelQueue provides a mock function with given fields:
func (_m *l1RollupConsumerInterfaceMock) StopAfterProcessChannelQueue() {
_m.Called()
}
// l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StopAfterProcessChannelQueue'
type l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call struct {
*mock.Call
}
// StopAfterProcessChannelQueue is a helper method to define mock.On call
func (_e *l1RollupConsumerInterfaceMock_Expecter) StopAfterProcessChannelQueue() *l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call {
return &l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call{Call: _e.mock.On("StopAfterProcessChannelQueue")}
}
func (_c *l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call) Run(run func()) *l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call) Return() *l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call {
_c.Call.Return()
return _c
}
func (_c *l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call) RunAndReturn(run func()) *l1RollupConsumerInterfaceMock_StopAfterProcessChannelQueue_Call {
_c.Call.Return(run)
return _c
}
// newL1RollupConsumerInterfaceMock creates a new instance of l1RollupConsumerInterfaceMock. 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 newL1RollupConsumerInterfaceMock(t interface {
mock.TestingT
Cleanup(func())
}) *l1RollupConsumerInterfaceMock {
mock := &l1RollupConsumerInterfaceMock{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}