github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/vote_processor_factory.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	hotstuff "github.com/onflow/flow-go/consensus/hotstuff"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	model "github.com/onflow/flow-go/consensus/hotstuff/model"
    10  
    11  	zerolog "github.com/rs/zerolog"
    12  )
    13  
    14  // VoteProcessorFactory is an autogenerated mock type for the VoteProcessorFactory type
    15  type VoteProcessorFactory struct {
    16  	mock.Mock
    17  }
    18  
    19  // Create provides a mock function with given fields: log, proposal
    20  func (_m *VoteProcessorFactory) Create(log zerolog.Logger, proposal *model.Proposal) (hotstuff.VerifyingVoteProcessor, error) {
    21  	ret := _m.Called(log, proposal)
    22  
    23  	var r0 hotstuff.VerifyingVoteProcessor
    24  	var r1 error
    25  	if rf, ok := ret.Get(0).(func(zerolog.Logger, *model.Proposal) (hotstuff.VerifyingVoteProcessor, error)); ok {
    26  		return rf(log, proposal)
    27  	}
    28  	if rf, ok := ret.Get(0).(func(zerolog.Logger, *model.Proposal) hotstuff.VerifyingVoteProcessor); ok {
    29  		r0 = rf(log, proposal)
    30  	} else {
    31  		if ret.Get(0) != nil {
    32  			r0 = ret.Get(0).(hotstuff.VerifyingVoteProcessor)
    33  		}
    34  	}
    35  
    36  	if rf, ok := ret.Get(1).(func(zerolog.Logger, *model.Proposal) error); ok {
    37  		r1 = rf(log, proposal)
    38  	} else {
    39  		r1 = ret.Error(1)
    40  	}
    41  
    42  	return r0, r1
    43  }
    44  
    45  type mockConstructorTestingTNewVoteProcessorFactory interface {
    46  	mock.TestingT
    47  	Cleanup(func())
    48  }
    49  
    50  // NewVoteProcessorFactory creates a new instance of VoteProcessorFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    51  func NewVoteProcessorFactory(t mockConstructorTestingTNewVoteProcessorFactory) *VoteProcessorFactory {
    52  	mock := &VoteProcessorFactory{}
    53  	mock.Mock.Test(t)
    54  
    55  	t.Cleanup(func() { mock.AssertExpectations(t) })
    56  
    57  	return mock
    58  }