github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/consensus/hotstuff/mocks/vote_collector.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  
    12  // VoteCollector is an autogenerated mock type for the VoteCollector type
    13  type VoteCollector struct {
    14  	mock.Mock
    15  }
    16  
    17  // AddVote provides a mock function with given fields: vote
    18  func (_m *VoteCollector) AddVote(vote *model.Vote) error {
    19  	ret := _m.Called(vote)
    20  
    21  	var r0 error
    22  	if rf, ok := ret.Get(0).(func(*model.Vote) error); ok {
    23  		r0 = rf(vote)
    24  	} else {
    25  		r0 = ret.Error(0)
    26  	}
    27  
    28  	return r0
    29  }
    30  
    31  // ProcessBlock provides a mock function with given fields: block
    32  func (_m *VoteCollector) ProcessBlock(block *model.Proposal) error {
    33  	ret := _m.Called(block)
    34  
    35  	var r0 error
    36  	if rf, ok := ret.Get(0).(func(*model.Proposal) error); ok {
    37  		r0 = rf(block)
    38  	} else {
    39  		r0 = ret.Error(0)
    40  	}
    41  
    42  	return r0
    43  }
    44  
    45  // RegisterVoteConsumer provides a mock function with given fields: consumer
    46  func (_m *VoteCollector) RegisterVoteConsumer(consumer hotstuff.VoteConsumer) {
    47  	_m.Called(consumer)
    48  }
    49  
    50  // Status provides a mock function with given fields:
    51  func (_m *VoteCollector) Status() hotstuff.VoteCollectorStatus {
    52  	ret := _m.Called()
    53  
    54  	var r0 hotstuff.VoteCollectorStatus
    55  	if rf, ok := ret.Get(0).(func() hotstuff.VoteCollectorStatus); ok {
    56  		r0 = rf()
    57  	} else {
    58  		r0 = ret.Get(0).(hotstuff.VoteCollectorStatus)
    59  	}
    60  
    61  	return r0
    62  }
    63  
    64  // View provides a mock function with given fields:
    65  func (_m *VoteCollector) View() uint64 {
    66  	ret := _m.Called()
    67  
    68  	var r0 uint64
    69  	if rf, ok := ret.Get(0).(func() uint64); ok {
    70  		r0 = rf()
    71  	} else {
    72  		r0 = ret.Get(0).(uint64)
    73  	}
    74  
    75  	return r0
    76  }
    77  
    78  type mockConstructorTestingTNewVoteCollector interface {
    79  	mock.TestingT
    80  	Cleanup(func())
    81  }
    82  
    83  // NewVoteCollector creates a new instance of VoteCollector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    84  func NewVoteCollector(t mockConstructorTestingTNewVoteCollector) *VoteCollector {
    85  	mock := &VoteCollector{}
    86  	mock.Mock.Test(t)
    87  
    88  	t.Cleanup(func() { mock.AssertExpectations(t) })
    89  
    90  	return mock
    91  }