ceremonyclient/consensus/mocks/verifying_vote_processor.go
Cassandra Heart a3d3a8d795
bulk of tests
2025-10-30 02:19:35 -05:00

86 lines
2.1 KiB
Go

// 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"
)
// VerifyingVoteProcessor is an autogenerated mock type for the VerifyingVoteProcessor type
type VerifyingVoteProcessor[StateT models.Unique, VoteT models.Unique] struct {
mock.Mock
}
// Process provides a mock function with given fields: vote
func (_m *VerifyingVoteProcessor[StateT, VoteT]) Process(vote *VoteT) error {
ret := _m.Called(vote)
if len(ret) == 0 {
panic("no return value specified for Process")
}
var r0 error
if rf, ok := ret.Get(0).(func(*VoteT) error); ok {
r0 = rf(vote)
} else {
r0 = ret.Error(0)
}
return r0
}
// State provides a mock function with no fields
func (_m *VerifyingVoteProcessor[StateT, VoteT]) State() *models.State[StateT] {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for State")
}
var r0 *models.State[StateT]
if rf, ok := ret.Get(0).(func() *models.State[StateT]); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*models.State[StateT])
}
}
return r0
}
// Status provides a mock function with no fields
func (_m *VerifyingVoteProcessor[StateT, VoteT]) Status() consensus.VoteCollectorStatus {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Status")
}
var r0 consensus.VoteCollectorStatus
if rf, ok := ret.Get(0).(func() consensus.VoteCollectorStatus); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(consensus.VoteCollectorStatus)
}
return r0
}
// NewVerifyingVoteProcessor creates a new instance of VerifyingVoteProcessor. 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 NewVerifyingVoteProcessor[StateT models.Unique, VoteT models.Unique](t interface {
mock.TestingT
Cleanup(func())
}) *VerifyingVoteProcessor[StateT, VoteT] {
mock := &VerifyingVoteProcessor[StateT, VoteT]{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}