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