github.com/aergoio/aergo@v1.3.1/p2p/p2pmock/mock_peerrole.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: peerrole.go
     3  
     4  // Package p2pmock is a generated GoMock package.
     5  package p2pmock
     6  
     7  import (
     8  	p2pcommon "github.com/aergoio/aergo/p2p/p2pcommon"
     9  	types "github.com/aergoio/aergo/types"
    10  	gomock "github.com/golang/mock/gomock"
    11  	reflect "reflect"
    12  )
    13  
    14  // MockPeerRoleManager is a mock of PeerRoleManager interface
    15  type MockPeerRoleManager struct {
    16  	ctrl     *gomock.Controller
    17  	recorder *MockPeerRoleManagerMockRecorder
    18  }
    19  
    20  // MockPeerRoleManagerMockRecorder is the mock recorder for MockPeerRoleManager
    21  type MockPeerRoleManagerMockRecorder struct {
    22  	mock *MockPeerRoleManager
    23  }
    24  
    25  // NewMockPeerRoleManager creates a new mock instance
    26  func NewMockPeerRoleManager(ctrl *gomock.Controller) *MockPeerRoleManager {
    27  	mock := &MockPeerRoleManager{ctrl: ctrl}
    28  	mock.recorder = &MockPeerRoleManagerMockRecorder{mock}
    29  	return mock
    30  }
    31  
    32  // EXPECT returns an object that allows the caller to indicate expected use
    33  func (m *MockPeerRoleManager) EXPECT() *MockPeerRoleManagerMockRecorder {
    34  	return m.recorder
    35  }
    36  
    37  // UpdateBP mocks base method
    38  func (m *MockPeerRoleManager) UpdateBP(toAdd, toRemove []types.PeerID) {
    39  	m.ctrl.T.Helper()
    40  	m.ctrl.Call(m, "UpdateBP", toAdd, toRemove)
    41  }
    42  
    43  // UpdateBP indicates an expected call of UpdateBP
    44  func (mr *MockPeerRoleManagerMockRecorder) UpdateBP(toAdd, toRemove interface{}) *gomock.Call {
    45  	mr.mock.ctrl.T.Helper()
    46  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateBP", reflect.TypeOf((*MockPeerRoleManager)(nil).UpdateBP), toAdd, toRemove)
    47  }
    48  
    49  // SelfRole mocks base method
    50  func (m *MockPeerRoleManager) SelfRole() p2pcommon.PeerRole {
    51  	m.ctrl.T.Helper()
    52  	ret := m.ctrl.Call(m, "SelfRole")
    53  	ret0, _ := ret[0].(p2pcommon.PeerRole)
    54  	return ret0
    55  }
    56  
    57  // SelfRole indicates an expected call of SelfRole
    58  func (mr *MockPeerRoleManagerMockRecorder) SelfRole() *gomock.Call {
    59  	mr.mock.ctrl.T.Helper()
    60  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SelfRole", reflect.TypeOf((*MockPeerRoleManager)(nil).SelfRole))
    61  }
    62  
    63  // GetRole mocks base method
    64  func (m *MockPeerRoleManager) GetRole(pid types.PeerID) p2pcommon.PeerRole {
    65  	m.ctrl.T.Helper()
    66  	ret := m.ctrl.Call(m, "GetRole", pid)
    67  	ret0, _ := ret[0].(p2pcommon.PeerRole)
    68  	return ret0
    69  }
    70  
    71  // GetRole indicates an expected call of GetRole
    72  func (mr *MockPeerRoleManagerMockRecorder) GetRole(pid interface{}) *gomock.Call {
    73  	mr.mock.ctrl.T.Helper()
    74  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRole", reflect.TypeOf((*MockPeerRoleManager)(nil).GetRole), pid)
    75  }
    76  
    77  // NotifyNewBlockMsg mocks base method
    78  func (m *MockPeerRoleManager) NotifyNewBlockMsg(mo p2pcommon.MsgOrder, peers []p2pcommon.RemotePeer) (int, int) {
    79  	m.ctrl.T.Helper()
    80  	ret := m.ctrl.Call(m, "NotifyNewBlockMsg", mo, peers)
    81  	ret0, _ := ret[0].(int)
    82  	ret1, _ := ret[1].(int)
    83  	return ret0, ret1
    84  }
    85  
    86  // NotifyNewBlockMsg indicates an expected call of NotifyNewBlockMsg
    87  func (mr *MockPeerRoleManagerMockRecorder) NotifyNewBlockMsg(mo, peers interface{}) *gomock.Call {
    88  	mr.mock.ctrl.T.Helper()
    89  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyNewBlockMsg", reflect.TypeOf((*MockPeerRoleManager)(nil).NotifyNewBlockMsg), mo, peers)
    90  }