github.com/onflow/flow-go@v0.33.17/consensus/hotstuff/mocks/vote_aggregation_violation_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 // VoteAggregationViolationConsumer is an autogenerated mock type for the VoteAggregationViolationConsumer type 11 type VoteAggregationViolationConsumer struct { 12 mock.Mock 13 } 14 15 // OnDoubleVotingDetected provides a mock function with given fields: _a0, _a1 16 func (_m *VoteAggregationViolationConsumer) OnDoubleVotingDetected(_a0 *model.Vote, _a1 *model.Vote) { 17 _m.Called(_a0, _a1) 18 } 19 20 // OnInvalidVoteDetected provides a mock function with given fields: err 21 func (_m *VoteAggregationViolationConsumer) OnInvalidVoteDetected(err model.InvalidVoteError) { 22 _m.Called(err) 23 } 24 25 // OnVoteForInvalidBlockDetected provides a mock function with given fields: vote, invalidProposal 26 func (_m *VoteAggregationViolationConsumer) OnVoteForInvalidBlockDetected(vote *model.Vote, invalidProposal *model.Proposal) { 27 _m.Called(vote, invalidProposal) 28 } 29 30 type mockConstructorTestingTNewVoteAggregationViolationConsumer interface { 31 mock.TestingT 32 Cleanup(func()) 33 } 34 35 // NewVoteAggregationViolationConsumer creates a new instance of VoteAggregationViolationConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 36 func NewVoteAggregationViolationConsumer(t mockConstructorTestingTNewVoteAggregationViolationConsumer) *VoteAggregationViolationConsumer { 37 mock := &VoteAggregationViolationConsumer{} 38 mock.Mock.Test(t) 39 40 t.Cleanup(func() { mock.AssertExpectations(t) }) 41 42 return mock 43 }