github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/proposal_violation_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 // ProposalViolationConsumer is an autogenerated mock type for the ProposalViolationConsumer type 14 type ProposalViolationConsumer struct { 15 mock.Mock 16 } 17 18 // OnDoubleProposeDetected provides a mock function with given fields: _a0, _a1 19 func (_m *ProposalViolationConsumer) OnDoubleProposeDetected(_a0 *model.Block, _a1 *model.Block) { 20 _m.Called(_a0, _a1) 21 } 22 23 // OnInvalidBlockDetected provides a mock function with given fields: err 24 func (_m *ProposalViolationConsumer) OnInvalidBlockDetected(err flow.Slashable[model.InvalidProposalError]) { 25 _m.Called(err) 26 } 27 28 type mockConstructorTestingTNewProposalViolationConsumer interface { 29 mock.TestingT 30 Cleanup(func()) 31 } 32 33 // NewProposalViolationConsumer creates a new instance of ProposalViolationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 34 func NewProposalViolationConsumer(t mockConstructorTestingTNewProposalViolationConsumer) *ProposalViolationConsumer { 35 mock := &ProposalViolationConsumer{} 36 mock.Mock.Test(t) 37 38 t.Cleanup(func() { mock.AssertExpectations(t) }) 39 40 return mock 41 }