/
mock_blocksync.go
119 lines (101 loc) · 3.89 KB
/
mock_blocksync.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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./blocksync/blocksync.go
// Package mock_blocksync is a generated GoMock package.
package mock_blocksync
import (
context "context"
gomock "github.com/golang/mock/gomock"
block "github.com/iotexproject/iotex-core/blockchain/block"
reflect "reflect"
)
// MockBlockSync is a mock of BlockSync interface
type MockBlockSync struct {
ctrl *gomock.Controller
recorder *MockBlockSyncMockRecorder
}
// MockBlockSyncMockRecorder is the mock recorder for MockBlockSync
type MockBlockSyncMockRecorder struct {
mock *MockBlockSync
}
// NewMockBlockSync creates a new mock instance
func NewMockBlockSync(ctrl *gomock.Controller) *MockBlockSync {
mock := &MockBlockSync{ctrl: ctrl}
mock.recorder = &MockBlockSyncMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockBlockSync) EXPECT() *MockBlockSyncMockRecorder {
return m.recorder
}
// Start mocks base method
func (m *MockBlockSync) 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 *MockBlockSyncMockRecorder) Start(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockBlockSync)(nil).Start), arg0)
}
// Stop mocks base method
func (m *MockBlockSync) 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 *MockBlockSyncMockRecorder) Stop(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockBlockSync)(nil).Stop), arg0)
}
// TargetHeight mocks base method
func (m *MockBlockSync) TargetHeight() uint64 {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TargetHeight")
ret0, _ := ret[0].(uint64)
return ret0
}
// TargetHeight indicates an expected call of TargetHeight
func (mr *MockBlockSyncMockRecorder) TargetHeight() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TargetHeight", reflect.TypeOf((*MockBlockSync)(nil).TargetHeight))
}
// ProcessSyncRequest mocks base method
func (m *MockBlockSync) ProcessSyncRequest(arg0 context.Context, arg1, arg2 uint64, arg3 func(context.Context, *block.Block) error) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ProcessSyncRequest", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(error)
return ret0
}
// ProcessSyncRequest indicates an expected call of ProcessSyncRequest
func (mr *MockBlockSyncMockRecorder) ProcessSyncRequest(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessSyncRequest", reflect.TypeOf((*MockBlockSync)(nil).ProcessSyncRequest), arg0, arg1, arg2, arg3)
}
// ProcessBlock mocks base method
func (m *MockBlockSync) ProcessBlock(arg0 context.Context, arg1 *block.Block) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ProcessBlock", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// ProcessBlock indicates an expected call of ProcessBlock
func (mr *MockBlockSyncMockRecorder) ProcessBlock(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ProcessBlock", reflect.TypeOf((*MockBlockSync)(nil).ProcessBlock), arg0, arg1)
}
// SyncStatus mocks base method
func (m *MockBlockSync) SyncStatus() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SyncStatus")
ret0, _ := ret[0].(string)
return ret0
}
// SyncStatus indicates an expected call of SyncStatus
func (mr *MockBlockSyncMockRecorder) SyncStatus() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncStatus", reflect.TypeOf((*MockBlockSync)(nil).SyncStatus))
}