github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/follower_consumer.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 8 mock "github.com/stretchr/testify/mock" 9 10 model "github.com/onflow/flow-go/consensus/hotstuff/model" 11 ) 12 13 // FollowerConsumer is an autogenerated mock type for the FollowerConsumer type 14 type FollowerConsumer struct { 15 mock.Mock 16 } 17 18 // OnBlockIncorporated provides a mock function with given fields: _a0 19 func (_m *FollowerConsumer) OnBlockIncorporated(_a0 *model.Block) { 20 _m.Called(_a0) 21 } 22 23 // OnDoubleProposeDetected provides a mock function with given fields: _a0, _a1 24 func (_m *FollowerConsumer) OnDoubleProposeDetected(_a0 *model.Block, _a1 *model.Block) { 25 _m.Called(_a0, _a1) 26 } 27 28 // OnFinalizedBlock provides a mock function with given fields: _a0 29 func (_m *FollowerConsumer) OnFinalizedBlock(_a0 *model.Block) { 30 _m.Called(_a0) 31 } 32 33 // OnInvalidBlockDetected provides a mock function with given fields: err 34 func (_m *FollowerConsumer) OnInvalidBlockDetected(err flow.Slashable[model.InvalidProposalError]) { 35 _m.Called(err) 36 } 37 38 type mockConstructorTestingTNewFollowerConsumer interface { 39 mock.TestingT 40 Cleanup(func()) 41 } 42 43 // NewFollowerConsumer creates a new instance of FollowerConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 44 func NewFollowerConsumer(t mockConstructorTestingTNewFollowerConsumer) *FollowerConsumer { 45 mock := &FollowerConsumer{} 46 mock.Mock.Test(t) 47 48 t.Cleanup(func() { mock.AssertExpectations(t) }) 49 50 return mock 51 }