github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/vote_aggregator.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 irrecoverable "github.com/koko1123/flow-go-1/module/irrecoverable" 7 mock "github.com/stretchr/testify/mock" 8 9 model "github.com/koko1123/flow-go-1/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) error { 19 ret := _m.Called(block) 20 21 var r0 error 22 if rf, ok := ret.Get(0).(func(*model.Proposal) error); ok { 23 r0 = rf(block) 24 } else { 25 r0 = ret.Error(0) 26 } 27 28 return r0 29 } 30 31 // AddVote provides a mock function with given fields: vote 32 func (_m *VoteAggregator) AddVote(vote *model.Vote) { 33 _m.Called(vote) 34 } 35 36 // Done provides a mock function with given fields: 37 func (_m *VoteAggregator) Done() <-chan struct{} { 38 ret := _m.Called() 39 40 var r0 <-chan struct{} 41 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 42 r0 = rf() 43 } else { 44 if ret.Get(0) != nil { 45 r0 = ret.Get(0).(<-chan struct{}) 46 } 47 } 48 49 return r0 50 } 51 52 // InvalidBlock provides a mock function with given fields: block 53 func (_m *VoteAggregator) InvalidBlock(block *model.Proposal) error { 54 ret := _m.Called(block) 55 56 var r0 error 57 if rf, ok := ret.Get(0).(func(*model.Proposal) error); ok { 58 r0 = rf(block) 59 } else { 60 r0 = ret.Error(0) 61 } 62 63 return r0 64 } 65 66 // PruneUpToView provides a mock function with given fields: view 67 func (_m *VoteAggregator) PruneUpToView(view uint64) { 68 _m.Called(view) 69 } 70 71 // Ready provides a mock function with given fields: 72 func (_m *VoteAggregator) Ready() <-chan struct{} { 73 ret := _m.Called() 74 75 var r0 <-chan struct{} 76 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 77 r0 = rf() 78 } else { 79 if ret.Get(0) != nil { 80 r0 = ret.Get(0).(<-chan struct{}) 81 } 82 } 83 84 return r0 85 } 86 87 // Start provides a mock function with given fields: _a0 88 func (_m *VoteAggregator) Start(_a0 irrecoverable.SignalerContext) { 89 _m.Called(_a0) 90 } 91 92 type mockConstructorTestingTNewVoteAggregator interface { 93 mock.TestingT 94 Cleanup(func()) 95 } 96 97 // 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. 98 func NewVoteAggregator(t mockConstructorTestingTNewVoteAggregator) *VoteAggregator { 99 mock := &VoteAggregator{} 100 mock.Mock.Test(t) 101 102 t.Cleanup(func() { mock.AssertExpectations(t) }) 103 104 return mock 105 }