github.com/koko1123/flow-go-1@v0.29.6/consensus/hotstuff/mocks/communicator.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	flow "github.com/koko1123/flow-go-1/model/flow"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	time "time"
    11  )
    12  
    13  // Communicator is an autogenerated mock type for the Communicator type
    14  type Communicator struct {
    15  	mock.Mock
    16  }
    17  
    18  // BroadcastProposal provides a mock function with given fields: proposal
    19  func (_m *Communicator) BroadcastProposal(proposal *flow.Header) error {
    20  	ret := _m.Called(proposal)
    21  
    22  	var r0 error
    23  	if rf, ok := ret.Get(0).(func(*flow.Header) error); ok {
    24  		r0 = rf(proposal)
    25  	} else {
    26  		r0 = ret.Error(0)
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // BroadcastProposalWithDelay provides a mock function with given fields: proposal, delay
    33  func (_m *Communicator) BroadcastProposalWithDelay(proposal *flow.Header, delay time.Duration) error {
    34  	ret := _m.Called(proposal, delay)
    35  
    36  	var r0 error
    37  	if rf, ok := ret.Get(0).(func(*flow.Header, time.Duration) error); ok {
    38  		r0 = rf(proposal, delay)
    39  	} else {
    40  		r0 = ret.Error(0)
    41  	}
    42  
    43  	return r0
    44  }
    45  
    46  // SendVote provides a mock function with given fields: blockID, view, sigData, recipientID
    47  func (_m *Communicator) SendVote(blockID flow.Identifier, view uint64, sigData []byte, recipientID flow.Identifier) error {
    48  	ret := _m.Called(blockID, view, sigData, recipientID)
    49  
    50  	var r0 error
    51  	if rf, ok := ret.Get(0).(func(flow.Identifier, uint64, []byte, flow.Identifier) error); ok {
    52  		r0 = rf(blockID, view, sigData, recipientID)
    53  	} else {
    54  		r0 = ret.Error(0)
    55  	}
    56  
    57  	return r0
    58  }
    59  
    60  type mockConstructorTestingTNewCommunicator interface {
    61  	mock.TestingT
    62  	Cleanup(func())
    63  }
    64  
    65  // NewCommunicator creates a new instance of Communicator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    66  func NewCommunicator(t mockConstructorTestingTNewCommunicator) *Communicator {
    67  	mock := &Communicator{}
    68  	mock.Mock.Test(t)
    69  
    70  	t.Cleanup(func() { mock.AssertExpectations(t) })
    71  
    72  	return mock
    73  }