github.com/onflow/flow-go@v0.33.17/consensus/hotstuff/mocks/vote_collectors.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  	irrecoverable "github.com/onflow/flow-go/module/irrecoverable"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // VoteCollectors is an autogenerated mock type for the VoteCollectors type
    13  type VoteCollectors struct {
    14  	mock.Mock
    15  }
    16  
    17  // Done provides a mock function with given fields:
    18  func (_m *VoteCollectors) Done() <-chan struct{} {
    19  	ret := _m.Called()
    20  
    21  	var r0 <-chan struct{}
    22  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    23  		r0 = rf()
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(<-chan struct{})
    27  		}
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // GetOrCreateCollector provides a mock function with given fields: view
    34  func (_m *VoteCollectors) GetOrCreateCollector(view uint64) (hotstuff.VoteCollector, bool, error) {
    35  	ret := _m.Called(view)
    36  
    37  	var r0 hotstuff.VoteCollector
    38  	var r1 bool
    39  	var r2 error
    40  	if rf, ok := ret.Get(0).(func(uint64) (hotstuff.VoteCollector, bool, error)); ok {
    41  		return rf(view)
    42  	}
    43  	if rf, ok := ret.Get(0).(func(uint64) hotstuff.VoteCollector); ok {
    44  		r0 = rf(view)
    45  	} else {
    46  		if ret.Get(0) != nil {
    47  			r0 = ret.Get(0).(hotstuff.VoteCollector)
    48  		}
    49  	}
    50  
    51  	if rf, ok := ret.Get(1).(func(uint64) bool); ok {
    52  		r1 = rf(view)
    53  	} else {
    54  		r1 = ret.Get(1).(bool)
    55  	}
    56  
    57  	if rf, ok := ret.Get(2).(func(uint64) error); ok {
    58  		r2 = rf(view)
    59  	} else {
    60  		r2 = ret.Error(2)
    61  	}
    62  
    63  	return r0, r1, r2
    64  }
    65  
    66  // PruneUpToView provides a mock function with given fields: lowestRetainedView
    67  func (_m *VoteCollectors) PruneUpToView(lowestRetainedView uint64) {
    68  	_m.Called(lowestRetainedView)
    69  }
    70  
    71  // Ready provides a mock function with given fields:
    72  func (_m *VoteCollectors) Ready() <-chan struct{} {
    73  	ret := _m.Called()
    74  
    75  	var r0 <-chan struct{}
    76  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    77  		r0 = rf()
    78  	} else {
    79  		if ret.Get(0) != nil {
    80  			r0 = ret.Get(0).(<-chan struct{})
    81  		}
    82  	}
    83  
    84  	return r0
    85  }
    86  
    87  // Start provides a mock function with given fields: _a0
    88  func (_m *VoteCollectors) Start(_a0 irrecoverable.SignalerContext) {
    89  	_m.Called(_a0)
    90  }
    91  
    92  type mockConstructorTestingTNewVoteCollectors interface {
    93  	mock.TestingT
    94  	Cleanup(func())
    95  }
    96  
    97  // NewVoteCollectors creates a new instance of VoteCollectors. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    98  func NewVoteCollectors(t mockConstructorTestingTNewVoteCollectors) *VoteCollectors {
    99  	mock := &VoteCollectors{}
   100  	mock.Mock.Test(t)
   101  
   102  	t.Cleanup(func() { mock.AssertExpectations(t) })
   103  
   104  	return mock
   105  }