github.com/koko1123/flow-go-1@v0.29.6/state/protocol/mock/epoch.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 9 protocol "github.com/koko1123/flow-go-1/state/protocol" 10 ) 11 12 // Epoch is an autogenerated mock type for the Epoch type 13 type Epoch struct { 14 mock.Mock 15 } 16 17 // Cluster provides a mock function with given fields: index 18 func (_m *Epoch) Cluster(index uint) (protocol.Cluster, error) { 19 ret := _m.Called(index) 20 21 var r0 protocol.Cluster 22 if rf, ok := ret.Get(0).(func(uint) protocol.Cluster); ok { 23 r0 = rf(index) 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(protocol.Cluster) 27 } 28 } 29 30 var r1 error 31 if rf, ok := ret.Get(1).(func(uint) error); ok { 32 r1 = rf(index) 33 } else { 34 r1 = ret.Error(1) 35 } 36 37 return r0, r1 38 } 39 40 // ClusterByChainID provides a mock function with given fields: chainID 41 func (_m *Epoch) ClusterByChainID(chainID flow.ChainID) (protocol.Cluster, error) { 42 ret := _m.Called(chainID) 43 44 var r0 protocol.Cluster 45 if rf, ok := ret.Get(0).(func(flow.ChainID) protocol.Cluster); ok { 46 r0 = rf(chainID) 47 } else { 48 if ret.Get(0) != nil { 49 r0 = ret.Get(0).(protocol.Cluster) 50 } 51 } 52 53 var r1 error 54 if rf, ok := ret.Get(1).(func(flow.ChainID) error); ok { 55 r1 = rf(chainID) 56 } else { 57 r1 = ret.Error(1) 58 } 59 60 return r0, r1 61 } 62 63 // Clustering provides a mock function with given fields: 64 func (_m *Epoch) Clustering() (flow.ClusterList, error) { 65 ret := _m.Called() 66 67 var r0 flow.ClusterList 68 if rf, ok := ret.Get(0).(func() flow.ClusterList); ok { 69 r0 = rf() 70 } else { 71 if ret.Get(0) != nil { 72 r0 = ret.Get(0).(flow.ClusterList) 73 } 74 } 75 76 var r1 error 77 if rf, ok := ret.Get(1).(func() error); ok { 78 r1 = rf() 79 } else { 80 r1 = ret.Error(1) 81 } 82 83 return r0, r1 84 } 85 86 // Counter provides a mock function with given fields: 87 func (_m *Epoch) Counter() (uint64, error) { 88 ret := _m.Called() 89 90 var r0 uint64 91 if rf, ok := ret.Get(0).(func() uint64); ok { 92 r0 = rf() 93 } else { 94 r0 = ret.Get(0).(uint64) 95 } 96 97 var r1 error 98 if rf, ok := ret.Get(1).(func() error); ok { 99 r1 = rf() 100 } else { 101 r1 = ret.Error(1) 102 } 103 104 return r0, r1 105 } 106 107 // DKG provides a mock function with given fields: 108 func (_m *Epoch) DKG() (protocol.DKG, error) { 109 ret := _m.Called() 110 111 var r0 protocol.DKG 112 if rf, ok := ret.Get(0).(func() protocol.DKG); ok { 113 r0 = rf() 114 } else { 115 if ret.Get(0) != nil { 116 r0 = ret.Get(0).(protocol.DKG) 117 } 118 } 119 120 var r1 error 121 if rf, ok := ret.Get(1).(func() error); ok { 122 r1 = rf() 123 } else { 124 r1 = ret.Error(1) 125 } 126 127 return r0, r1 128 } 129 130 // DKGPhase1FinalView provides a mock function with given fields: 131 func (_m *Epoch) DKGPhase1FinalView() (uint64, error) { 132 ret := _m.Called() 133 134 var r0 uint64 135 if rf, ok := ret.Get(0).(func() uint64); ok { 136 r0 = rf() 137 } else { 138 r0 = ret.Get(0).(uint64) 139 } 140 141 var r1 error 142 if rf, ok := ret.Get(1).(func() error); ok { 143 r1 = rf() 144 } else { 145 r1 = ret.Error(1) 146 } 147 148 return r0, r1 149 } 150 151 // DKGPhase2FinalView provides a mock function with given fields: 152 func (_m *Epoch) DKGPhase2FinalView() (uint64, error) { 153 ret := _m.Called() 154 155 var r0 uint64 156 if rf, ok := ret.Get(0).(func() uint64); ok { 157 r0 = rf() 158 } else { 159 r0 = ret.Get(0).(uint64) 160 } 161 162 var r1 error 163 if rf, ok := ret.Get(1).(func() error); ok { 164 r1 = rf() 165 } else { 166 r1 = ret.Error(1) 167 } 168 169 return r0, r1 170 } 171 172 // DKGPhase3FinalView provides a mock function with given fields: 173 func (_m *Epoch) DKGPhase3FinalView() (uint64, error) { 174 ret := _m.Called() 175 176 var r0 uint64 177 if rf, ok := ret.Get(0).(func() uint64); ok { 178 r0 = rf() 179 } else { 180 r0 = ret.Get(0).(uint64) 181 } 182 183 var r1 error 184 if rf, ok := ret.Get(1).(func() error); ok { 185 r1 = rf() 186 } else { 187 r1 = ret.Error(1) 188 } 189 190 return r0, r1 191 } 192 193 // FinalView provides a mock function with given fields: 194 func (_m *Epoch) FinalView() (uint64, error) { 195 ret := _m.Called() 196 197 var r0 uint64 198 if rf, ok := ret.Get(0).(func() uint64); ok { 199 r0 = rf() 200 } else { 201 r0 = ret.Get(0).(uint64) 202 } 203 204 var r1 error 205 if rf, ok := ret.Get(1).(func() error); ok { 206 r1 = rf() 207 } else { 208 r1 = ret.Error(1) 209 } 210 211 return r0, r1 212 } 213 214 // FirstView provides a mock function with given fields: 215 func (_m *Epoch) FirstView() (uint64, error) { 216 ret := _m.Called() 217 218 var r0 uint64 219 if rf, ok := ret.Get(0).(func() uint64); ok { 220 r0 = rf() 221 } else { 222 r0 = ret.Get(0).(uint64) 223 } 224 225 var r1 error 226 if rf, ok := ret.Get(1).(func() error); ok { 227 r1 = rf() 228 } else { 229 r1 = ret.Error(1) 230 } 231 232 return r0, r1 233 } 234 235 // InitialIdentities provides a mock function with given fields: 236 func (_m *Epoch) InitialIdentities() (flow.IdentityList, error) { 237 ret := _m.Called() 238 239 var r0 flow.IdentityList 240 if rf, ok := ret.Get(0).(func() flow.IdentityList); ok { 241 r0 = rf() 242 } else { 243 if ret.Get(0) != nil { 244 r0 = ret.Get(0).(flow.IdentityList) 245 } 246 } 247 248 var r1 error 249 if rf, ok := ret.Get(1).(func() error); ok { 250 r1 = rf() 251 } else { 252 r1 = ret.Error(1) 253 } 254 255 return r0, r1 256 } 257 258 // RandomSource provides a mock function with given fields: 259 func (_m *Epoch) RandomSource() ([]byte, error) { 260 ret := _m.Called() 261 262 var r0 []byte 263 if rf, ok := ret.Get(0).(func() []byte); ok { 264 r0 = rf() 265 } else { 266 if ret.Get(0) != nil { 267 r0 = ret.Get(0).([]byte) 268 } 269 } 270 271 var r1 error 272 if rf, ok := ret.Get(1).(func() error); ok { 273 r1 = rf() 274 } else { 275 r1 = ret.Error(1) 276 } 277 278 return r0, r1 279 } 280 281 type mockConstructorTestingTNewEpoch interface { 282 mock.TestingT 283 Cleanup(func()) 284 } 285 286 // NewEpoch creates a new instance of Epoch. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 287 func NewEpoch(t mockConstructorTestingTNewEpoch) *Epoch { 288 mock := &Epoch{} 289 mock.Mock.Test(t) 290 291 t.Cleanup(func() { mock.AssertExpectations(t) }) 292 293 return mock 294 }