github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/conduit_adapter.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mocknetwork
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  	channels "github.com/onflow/flow-go/network/channels"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	network "github.com/onflow/flow-go/network"
    12  )
    13  
    14  // ConduitAdapter is an autogenerated mock type for the ConduitAdapter type
    15  type ConduitAdapter struct {
    16  	mock.Mock
    17  }
    18  
    19  // MulticastOnChannel provides a mock function with given fields: _a0, _a1, _a2, _a3
    20  func (_m *ConduitAdapter) MulticastOnChannel(_a0 channels.Channel, _a1 interface{}, _a2 uint, _a3 ...flow.Identifier) error {
    21  	_va := make([]interface{}, len(_a3))
    22  	for _i := range _a3 {
    23  		_va[_i] = _a3[_i]
    24  	}
    25  	var _ca []interface{}
    26  	_ca = append(_ca, _a0, _a1, _a2)
    27  	_ca = append(_ca, _va...)
    28  	ret := _m.Called(_ca...)
    29  
    30  	var r0 error
    31  	if rf, ok := ret.Get(0).(func(channels.Channel, interface{}, uint, ...flow.Identifier) error); ok {
    32  		r0 = rf(_a0, _a1, _a2, _a3...)
    33  	} else {
    34  		r0 = ret.Error(0)
    35  	}
    36  
    37  	return r0
    38  }
    39  
    40  // PublishOnChannel provides a mock function with given fields: _a0, _a1, _a2
    41  func (_m *ConduitAdapter) PublishOnChannel(_a0 channels.Channel, _a1 interface{}, _a2 ...flow.Identifier) error {
    42  	_va := make([]interface{}, len(_a2))
    43  	for _i := range _a2 {
    44  		_va[_i] = _a2[_i]
    45  	}
    46  	var _ca []interface{}
    47  	_ca = append(_ca, _a0, _a1)
    48  	_ca = append(_ca, _va...)
    49  	ret := _m.Called(_ca...)
    50  
    51  	var r0 error
    52  	if rf, ok := ret.Get(0).(func(channels.Channel, interface{}, ...flow.Identifier) error); ok {
    53  		r0 = rf(_a0, _a1, _a2...)
    54  	} else {
    55  		r0 = ret.Error(0)
    56  	}
    57  
    58  	return r0
    59  }
    60  
    61  // ReportMisbehaviorOnChannel provides a mock function with given fields: channel, report
    62  func (_m *ConduitAdapter) ReportMisbehaviorOnChannel(channel channels.Channel, report network.MisbehaviorReport) {
    63  	_m.Called(channel, report)
    64  }
    65  
    66  // UnRegisterChannel provides a mock function with given fields: channel
    67  func (_m *ConduitAdapter) UnRegisterChannel(channel channels.Channel) error {
    68  	ret := _m.Called(channel)
    69  
    70  	var r0 error
    71  	if rf, ok := ret.Get(0).(func(channels.Channel) error); ok {
    72  		r0 = rf(channel)
    73  	} else {
    74  		r0 = ret.Error(0)
    75  	}
    76  
    77  	return r0
    78  }
    79  
    80  // UnicastOnChannel provides a mock function with given fields: _a0, _a1, _a2
    81  func (_m *ConduitAdapter) UnicastOnChannel(_a0 channels.Channel, _a1 interface{}, _a2 flow.Identifier) error {
    82  	ret := _m.Called(_a0, _a1, _a2)
    83  
    84  	var r0 error
    85  	if rf, ok := ret.Get(0).(func(channels.Channel, interface{}, flow.Identifier) error); ok {
    86  		r0 = rf(_a0, _a1, _a2)
    87  	} else {
    88  		r0 = ret.Error(0)
    89  	}
    90  
    91  	return r0
    92  }
    93  
    94  type mockConstructorTestingTNewConduitAdapter interface {
    95  	mock.TestingT
    96  	Cleanup(func())
    97  }
    98  
    99  // NewConduitAdapter creates a new instance of ConduitAdapter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   100  func NewConduitAdapter(t mockConstructorTestingTNewConduitAdapter) *ConduitAdapter {
   101  	mock := &ConduitAdapter{}
   102  	mock.Mock.Test(t)
   103  
   104  	t.Cleanup(func() { mock.AssertExpectations(t) })
   105  
   106  	return mock
   107  }