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