github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/vote_collectors.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 hotstuff "github.com/koko1123/flow-go-1/consensus/hotstuff" 7 irrecoverable "github.com/koko1123/flow-go-1/module/irrecoverable" 8 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // VoteCollectors is an autogenerated mock type for the VoteCollectors type 13 type VoteCollectors struct { 14 mock.Mock 15 } 16 17 // Done provides a mock function with given fields: 18 func (_m *VoteCollectors) Done() <-chan struct{} { 19 ret := _m.Called() 20 21 var r0 <-chan struct{} 22 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 23 r0 = rf() 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(<-chan struct{}) 27 } 28 } 29 30 return r0 31 } 32 33 // GetOrCreateCollector provides a mock function with given fields: view 34 func (_m *VoteCollectors) GetOrCreateCollector(view uint64) (hotstuff.VoteCollector, bool, error) { 35 ret := _m.Called(view) 36 37 var r0 hotstuff.VoteCollector 38 if rf, ok := ret.Get(0).(func(uint64) hotstuff.VoteCollector); ok { 39 r0 = rf(view) 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).(hotstuff.VoteCollector) 43 } 44 } 45 46 var r1 bool 47 if rf, ok := ret.Get(1).(func(uint64) bool); ok { 48 r1 = rf(view) 49 } else { 50 r1 = ret.Get(1).(bool) 51 } 52 53 var r2 error 54 if rf, ok := ret.Get(2).(func(uint64) error); ok { 55 r2 = rf(view) 56 } else { 57 r2 = ret.Error(2) 58 } 59 60 return r0, r1, r2 61 } 62 63 // PruneUpToView provides a mock function with given fields: lowestRetainedView 64 func (_m *VoteCollectors) PruneUpToView(lowestRetainedView uint64) { 65 _m.Called(lowestRetainedView) 66 } 67 68 // Ready provides a mock function with given fields: 69 func (_m *VoteCollectors) Ready() <-chan struct{} { 70 ret := _m.Called() 71 72 var r0 <-chan struct{} 73 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 74 r0 = rf() 75 } else { 76 if ret.Get(0) != nil { 77 r0 = ret.Get(0).(<-chan struct{}) 78 } 79 } 80 81 return r0 82 } 83 84 // Start provides a mock function with given fields: _a0 85 func (_m *VoteCollectors) Start(_a0 irrecoverable.SignalerContext) { 86 _m.Called(_a0) 87 } 88 89 type mockConstructorTestingTNewVoteCollectors interface { 90 mock.TestingT 91 Cleanup(func()) 92 } 93 94 // NewVoteCollectors creates a new instance of VoteCollectors. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 95 func NewVoteCollectors(t mockConstructorTestingTNewVoteCollectors) *VoteCollectors { 96 mock := &VoteCollectors{} 97 mock.Mock.Test(t) 98 99 t.Cleanup(func() { mock.AssertExpectations(t) }) 100 101 return mock 102 }