// Code generated by mockery. DO NOT EDIT. package mocks import ( mock "github.com/stretchr/testify/mock" consensus "source.quilibrium.com/quilibrium/monorepo/consensus" models "source.quilibrium.com/quilibrium/monorepo/consensus/models" time "time" ) // Consumer is an autogenerated mock type for the Consumer type type Consumer[StateT models.Unique, VoteT models.Unique] struct { mock.Mock } // OnCurrentRankDetails provides a mock function with given fields: currentRank, finalizedRank, currentLeader func (_m *Consumer[StateT, VoteT]) OnCurrentRankDetails(currentRank uint64, finalizedRank uint64, currentLeader models.Identity) { _m.Called(currentRank, finalizedRank, currentLeader) } // OnDoubleProposeDetected provides a mock function with given fields: _a0, _a1 func (_m *Consumer[StateT, VoteT]) OnDoubleProposeDetected(_a0 *models.State[StateT], _a1 *models.State[StateT]) { _m.Called(_a0, _a1) } // OnEventProcessed provides a mock function with no fields func (_m *Consumer[StateT, VoteT]) OnEventProcessed() { _m.Called() } // OnFinalizedState provides a mock function with given fields: _a0 func (_m *Consumer[StateT, VoteT]) OnFinalizedState(_a0 *models.State[StateT]) { _m.Called(_a0) } // OnInvalidStateDetected provides a mock function with given fields: err func (_m *Consumer[StateT, VoteT]) OnInvalidStateDetected(err *models.InvalidProposalError[StateT, VoteT]) { _m.Called(err) } // OnLocalTimeout provides a mock function with given fields: currentRank func (_m *Consumer[StateT, VoteT]) OnLocalTimeout(currentRank uint64) { _m.Called(currentRank) } // OnOwnProposal provides a mock function with given fields: proposal, targetPublicationTime func (_m *Consumer[StateT, VoteT]) OnOwnProposal(proposal *models.SignedProposal[StateT, VoteT], targetPublicationTime time.Time) { _m.Called(proposal, targetPublicationTime) } // OnOwnTimeout provides a mock function with given fields: timeout func (_m *Consumer[StateT, VoteT]) OnOwnTimeout(timeout *models.TimeoutState[VoteT]) { _m.Called(timeout) } // OnOwnVote provides a mock function with given fields: vote, recipientID func (_m *Consumer[StateT, VoteT]) OnOwnVote(vote *VoteT, recipientID models.Identity) { _m.Called(vote, recipientID) } // OnPartialTimeoutCertificate provides a mock function with given fields: currentRank, partialTimeoutCertificate func (_m *Consumer[StateT, VoteT]) OnPartialTimeoutCertificate(currentRank uint64, partialTimeoutCertificate *consensus.PartialTimeoutCertificateCreated) { _m.Called(currentRank, partialTimeoutCertificate) } // OnQuorumCertificateTriggeredRankChange provides a mock function with given fields: oldRank, newRank, qc func (_m *Consumer[StateT, VoteT]) OnQuorumCertificateTriggeredRankChange(oldRank uint64, newRank uint64, qc models.QuorumCertificate) { _m.Called(oldRank, newRank, qc) } // OnRankChange provides a mock function with given fields: oldRank, newRank func (_m *Consumer[StateT, VoteT]) OnRankChange(oldRank uint64, newRank uint64) { _m.Called(oldRank, newRank) } // OnReceiveProposal provides a mock function with given fields: currentRank, proposal func (_m *Consumer[StateT, VoteT]) OnReceiveProposal(currentRank uint64, proposal *models.SignedProposal[StateT, VoteT]) { _m.Called(currentRank, proposal) } // OnReceiveQuorumCertificate provides a mock function with given fields: currentRank, qc func (_m *Consumer[StateT, VoteT]) OnReceiveQuorumCertificate(currentRank uint64, qc models.QuorumCertificate) { _m.Called(currentRank, qc) } // OnReceiveTimeoutCertificate provides a mock function with given fields: currentRank, tc func (_m *Consumer[StateT, VoteT]) OnReceiveTimeoutCertificate(currentRank uint64, tc models.TimeoutCertificate) { _m.Called(currentRank, tc) } // OnStart provides a mock function with given fields: currentRank func (_m *Consumer[StateT, VoteT]) OnStart(currentRank uint64) { _m.Called(currentRank) } // OnStartingTimeout provides a mock function with given fields: startTime, endTime func (_m *Consumer[StateT, VoteT]) OnStartingTimeout(startTime time.Time, endTime time.Time) { _m.Called(startTime, endTime) } // OnStateIncorporated provides a mock function with given fields: _a0 func (_m *Consumer[StateT, VoteT]) OnStateIncorporated(_a0 *models.State[StateT]) { _m.Called(_a0) } // OnTimeoutCertificateTriggeredRankChange provides a mock function with given fields: oldRank, newRank, tc func (_m *Consumer[StateT, VoteT]) OnTimeoutCertificateTriggeredRankChange(oldRank uint64, newRank uint64, tc models.TimeoutCertificate) { _m.Called(oldRank, newRank, tc) } // NewConsumer creates a new instance of Consumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewConsumer[StateT models.Unique, VoteT models.Unique](t interface { mock.TestingT Cleanup(func()) }) *Consumer[StateT, VoteT] { mock := &Consumer[StateT, VoteT]{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }