ceremonyclient/consensus/mocks/timeout_processor_factory.go

60 lines
1.6 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"
)
// TimeoutProcessorFactory is an autogenerated mock type for the TimeoutProcessorFactory type
type TimeoutProcessorFactory[VoteT models.Unique] struct {
mock.Mock
}
// Create provides a mock function with given fields: rank
func (_m *TimeoutProcessorFactory[VoteT]) Create(rank uint64) (consensus.TimeoutProcessor[VoteT], error) {
ret := _m.Called(rank)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 consensus.TimeoutProcessor[VoteT]
var r1 error
if rf, ok := ret.Get(0).(func(uint64) (consensus.TimeoutProcessor[VoteT], error)); ok {
return rf(rank)
}
if rf, ok := ret.Get(0).(func(uint64) consensus.TimeoutProcessor[VoteT]); ok {
r0 = rf(rank)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(consensus.TimeoutProcessor[VoteT])
}
}
if rf, ok := ret.Get(1).(func(uint64) error); ok {
r1 = rf(rank)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// NewTimeoutProcessorFactory creates a new instance of TimeoutProcessorFactory. 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 NewTimeoutProcessorFactory[VoteT models.Unique](t interface {
mock.TestingT
Cleanup(func())
}) *TimeoutProcessorFactory[VoteT] {
mock := &TimeoutProcessorFactory[VoteT]{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}