github.com/koko1123/flow-go-1@v0.29.6/network/mocknetwork/conduit.go (about)

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