// Code generated by mockery. DO NOT EDIT. package mocks import ( mock "github.com/stretchr/testify/mock" models "source.quilibrium.com/quilibrium/monorepo/consensus/models" ) // SafetyRules is an autogenerated mock type for the SafetyRules type type SafetyRules[StateT models.Unique, VoteT models.Unique] struct { mock.Mock } // ProduceTimeout provides a mock function with given fields: curRank, newestQC, lastRankTC func (_m *SafetyRules[StateT, VoteT]) ProduceTimeout(curRank uint64, newestQC models.QuorumCertificate, lastRankTC models.TimeoutCertificate) (*models.TimeoutState[VoteT], error) { ret := _m.Called(curRank, newestQC, lastRankTC) if len(ret) == 0 { panic("no return value specified for ProduceTimeout") } var r0 *models.TimeoutState[VoteT] var r1 error if rf, ok := ret.Get(0).(func(uint64, models.QuorumCertificate, models.TimeoutCertificate) (*models.TimeoutState[VoteT], error)); ok { return rf(curRank, newestQC, lastRankTC) } if rf, ok := ret.Get(0).(func(uint64, models.QuorumCertificate, models.TimeoutCertificate) *models.TimeoutState[VoteT]); ok { r0 = rf(curRank, newestQC, lastRankTC) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*models.TimeoutState[VoteT]) } } if rf, ok := ret.Get(1).(func(uint64, models.QuorumCertificate, models.TimeoutCertificate) error); ok { r1 = rf(curRank, newestQC, lastRankTC) } else { r1 = ret.Error(1) } return r0, r1 } // ProduceVote provides a mock function with given fields: proposal, curRank func (_m *SafetyRules[StateT, VoteT]) ProduceVote(proposal *models.SignedProposal[StateT, VoteT], curRank uint64) (*VoteT, error) { ret := _m.Called(proposal, curRank) if len(ret) == 0 { panic("no return value specified for ProduceVote") } var r0 *VoteT var r1 error if rf, ok := ret.Get(0).(func(*models.SignedProposal[StateT, VoteT], uint64) (*VoteT, error)); ok { return rf(proposal, curRank) } if rf, ok := ret.Get(0).(func(*models.SignedProposal[StateT, VoteT], uint64) *VoteT); ok { r0 = rf(proposal, curRank) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*VoteT) } } if rf, ok := ret.Get(1).(func(*models.SignedProposal[StateT, VoteT], uint64) error); ok { r1 = rf(proposal, curRank) } else { r1 = ret.Error(1) } return r0, r1 } // SignOwnProposal provides a mock function with given fields: unsignedProposal func (_m *SafetyRules[StateT, VoteT]) SignOwnProposal(unsignedProposal *models.Proposal[StateT]) (*VoteT, error) { ret := _m.Called(unsignedProposal) if len(ret) == 0 { panic("no return value specified for SignOwnProposal") } var r0 *VoteT var r1 error if rf, ok := ret.Get(0).(func(*models.Proposal[StateT]) (*VoteT, error)); ok { return rf(unsignedProposal) } if rf, ok := ret.Get(0).(func(*models.Proposal[StateT]) *VoteT); ok { r0 = rf(unsignedProposal) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*VoteT) } } if rf, ok := ret.Get(1).(func(*models.Proposal[StateT]) error); ok { r1 = rf(unsignedProposal) } else { r1 = ret.Error(1) } return r0, r1 } // NewSafetyRules creates a new instance of SafetyRules. 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 NewSafetyRules[StateT models.Unique, VoteT models.Unique](t interface { mock.TestingT Cleanup(func()) }) *SafetyRules[StateT, VoteT] { mock := &SafetyRules[StateT, VoteT]{} mock.Mock.Test(t) t.Cleanup(func() { mock.AssertExpectations(t) }) return mock }