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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  
     8  	irrecoverable "github.com/onflow/flow-go/module/irrecoverable"
     9  
    10  	mock "github.com/stretchr/testify/mock"
    11  
    12  	model "github.com/onflow/flow-go/consensus/hotstuff/model"
    13  )
    14  
    15  // EventLoop is an autogenerated mock type for the EventLoop type
    16  type EventLoop struct {
    17  	mock.Mock
    18  }
    19  
    20  // Done provides a mock function with given fields:
    21  func (_m *EventLoop) Done() <-chan struct{} {
    22  	ret := _m.Called()
    23  
    24  	var r0 <-chan struct{}
    25  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    26  		r0 = rf()
    27  	} else {
    28  		if ret.Get(0) != nil {
    29  			r0 = ret.Get(0).(<-chan struct{})
    30  		}
    31  	}
    32  
    33  	return r0
    34  }
    35  
    36  // OnNewQcDiscovered provides a mock function with given fields: certificate
    37  func (_m *EventLoop) OnNewQcDiscovered(certificate *flow.QuorumCertificate) {
    38  	_m.Called(certificate)
    39  }
    40  
    41  // OnNewTcDiscovered provides a mock function with given fields: certificate
    42  func (_m *EventLoop) OnNewTcDiscovered(certificate *flow.TimeoutCertificate) {
    43  	_m.Called(certificate)
    44  }
    45  
    46  // OnPartialTcCreated provides a mock function with given fields: view, newestQC, lastViewTC
    47  func (_m *EventLoop) OnPartialTcCreated(view uint64, newestQC *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate) {
    48  	_m.Called(view, newestQC, lastViewTC)
    49  }
    50  
    51  // OnQcConstructedFromVotes provides a mock function with given fields: _a0
    52  func (_m *EventLoop) OnQcConstructedFromVotes(_a0 *flow.QuorumCertificate) {
    53  	_m.Called(_a0)
    54  }
    55  
    56  // OnTcConstructedFromTimeouts provides a mock function with given fields: certificate
    57  func (_m *EventLoop) OnTcConstructedFromTimeouts(certificate *flow.TimeoutCertificate) {
    58  	_m.Called(certificate)
    59  }
    60  
    61  // OnTimeoutProcessed provides a mock function with given fields: timeout
    62  func (_m *EventLoop) OnTimeoutProcessed(timeout *model.TimeoutObject) {
    63  	_m.Called(timeout)
    64  }
    65  
    66  // OnVoteProcessed provides a mock function with given fields: vote
    67  func (_m *EventLoop) OnVoteProcessed(vote *model.Vote) {
    68  	_m.Called(vote)
    69  }
    70  
    71  // Ready provides a mock function with given fields:
    72  func (_m *EventLoop) 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 *EventLoop) Start(_a0 irrecoverable.SignalerContext) {
    89  	_m.Called(_a0)
    90  }
    91  
    92  // SubmitProposal provides a mock function with given fields: proposal
    93  func (_m *EventLoop) SubmitProposal(proposal *model.Proposal) {
    94  	_m.Called(proposal)
    95  }
    96  
    97  type mockConstructorTestingTNewEventLoop interface {
    98  	mock.TestingT
    99  	Cleanup(func())
   100  }
   101  
   102  // NewEventLoop creates a new instance of EventLoop. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   103  func NewEventLoop(t mockConstructorTestingTNewEventLoop) *EventLoop {
   104  	mock := &EventLoop{}
   105  	mock.Mock.Test(t)
   106  
   107  	t.Cleanup(func() { mock.AssertExpectations(t) })
   108  
   109  	return mock
   110  }