-
Notifications
You must be signed in to change notification settings - Fork 211
/
mocks.go
173 lines (144 loc) · 5.21 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
// Code generated by MockGen. DO NOT EDIT.
// Source: ./interface.go
// Package eligibility is a generated GoMock package.
package eligibility
import (
reflect "reflect"
types "github.com/spacemeshos/go-spacemesh/common/types"
gomock "go.uber.org/mock/gomock"
)
// MockactiveSetCache is a mock of activeSetCache interface.
type MockactiveSetCache struct {
ctrl *gomock.Controller
recorder *MockactiveSetCacheMockRecorder
}
// MockactiveSetCacheMockRecorder is the mock recorder for MockactiveSetCache.
type MockactiveSetCacheMockRecorder struct {
mock *MockactiveSetCache
}
// NewMockactiveSetCache creates a new mock instance.
func NewMockactiveSetCache(ctrl *gomock.Controller) *MockactiveSetCache {
mock := &MockactiveSetCache{ctrl: ctrl}
mock.recorder = &MockactiveSetCacheMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockactiveSetCache) EXPECT() *MockactiveSetCacheMockRecorder {
return m.recorder
}
// Add mocks base method.
func (m *MockactiveSetCache) Add(key types.EpochID, value *cachedActiveSet) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Add", key, value)
ret0, _ := ret[0].(bool)
return ret0
}
// Add indicates an expected call of Add.
func (mr *MockactiveSetCacheMockRecorder) Add(key, value interface{}) *activeSetCacheAddCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Add", reflect.TypeOf((*MockactiveSetCache)(nil).Add), key, value)
return &activeSetCacheAddCall{Call: call}
}
// activeSetCacheAddCall wrap *gomock.Call
type activeSetCacheAddCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *activeSetCacheAddCall) Return(evicted bool) *activeSetCacheAddCall {
c.Call = c.Call.Return(evicted)
return c
}
// Do rewrite *gomock.Call.Do
func (c *activeSetCacheAddCall) Do(f func(types.EpochID, *cachedActiveSet) bool) *activeSetCacheAddCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *activeSetCacheAddCall) DoAndReturn(f func(types.EpochID, *cachedActiveSet) bool) *activeSetCacheAddCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Get mocks base method.
func (m *MockactiveSetCache) Get(key types.EpochID) (*cachedActiveSet, bool) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", key)
ret0, _ := ret[0].(*cachedActiveSet)
ret1, _ := ret[1].(bool)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockactiveSetCacheMockRecorder) Get(key interface{}) *activeSetCacheGetCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockactiveSetCache)(nil).Get), key)
return &activeSetCacheGetCall{Call: call}
}
// activeSetCacheGetCall wrap *gomock.Call
type activeSetCacheGetCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *activeSetCacheGetCall) Return(value *cachedActiveSet, ok bool) *activeSetCacheGetCall {
c.Call = c.Call.Return(value, ok)
return c
}
// Do rewrite *gomock.Call.Do
func (c *activeSetCacheGetCall) Do(f func(types.EpochID) (*cachedActiveSet, bool)) *activeSetCacheGetCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *activeSetCacheGetCall) DoAndReturn(f func(types.EpochID) (*cachedActiveSet, bool)) *activeSetCacheGetCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockvrfVerifier is a mock of vrfVerifier interface.
type MockvrfVerifier struct {
ctrl *gomock.Controller
recorder *MockvrfVerifierMockRecorder
}
// MockvrfVerifierMockRecorder is the mock recorder for MockvrfVerifier.
type MockvrfVerifierMockRecorder struct {
mock *MockvrfVerifier
}
// NewMockvrfVerifier creates a new mock instance.
func NewMockvrfVerifier(ctrl *gomock.Controller) *MockvrfVerifier {
mock := &MockvrfVerifier{ctrl: ctrl}
mock.recorder = &MockvrfVerifierMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockvrfVerifier) EXPECT() *MockvrfVerifierMockRecorder {
return m.recorder
}
// Verify mocks base method.
func (m *MockvrfVerifier) Verify(nodeID types.NodeID, msg []byte, sig types.VrfSignature) bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Verify", nodeID, msg, sig)
ret0, _ := ret[0].(bool)
return ret0
}
// Verify indicates an expected call of Verify.
func (mr *MockvrfVerifierMockRecorder) Verify(nodeID, msg, sig interface{}) *vrfVerifierVerifyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Verify", reflect.TypeOf((*MockvrfVerifier)(nil).Verify), nodeID, msg, sig)
return &vrfVerifierVerifyCall{Call: call}
}
// vrfVerifierVerifyCall wrap *gomock.Call
type vrfVerifierVerifyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *vrfVerifierVerifyCall) Return(arg0 bool) *vrfVerifierVerifyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *vrfVerifierVerifyCall) Do(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *vrfVerifierVerifyCall) DoAndReturn(f func(types.NodeID, []byte, types.VrfSignature) bool) *vrfVerifierVerifyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}