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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mockp2p
     4  
     5  import (
     6  	kbucket "github.com/libp2p/go-libp2p-kbucket"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	routing "github.com/libp2p/go-libp2p/core/routing"
    10  )
    11  
    12  // Routable is an autogenerated mock type for the Routable type
    13  type Routable struct {
    14  	mock.Mock
    15  }
    16  
    17  // Routing provides a mock function with given fields:
    18  func (_m *Routable) Routing() routing.Routing {
    19  	ret := _m.Called()
    20  
    21  	var r0 routing.Routing
    22  	if rf, ok := ret.Get(0).(func() routing.Routing); ok {
    23  		r0 = rf()
    24  	} else {
    25  		if ret.Get(0) != nil {
    26  			r0 = ret.Get(0).(routing.Routing)
    27  		}
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // RoutingTable provides a mock function with given fields:
    34  func (_m *Routable) RoutingTable() *kbucket.RoutingTable {
    35  	ret := _m.Called()
    36  
    37  	var r0 *kbucket.RoutingTable
    38  	if rf, ok := ret.Get(0).(func() *kbucket.RoutingTable); ok {
    39  		r0 = rf()
    40  	} else {
    41  		if ret.Get(0) != nil {
    42  			r0 = ret.Get(0).(*kbucket.RoutingTable)
    43  		}
    44  	}
    45  
    46  	return r0
    47  }
    48  
    49  // SetRouting provides a mock function with given fields: r
    50  func (_m *Routable) SetRouting(r routing.Routing) error {
    51  	ret := _m.Called(r)
    52  
    53  	var r0 error
    54  	if rf, ok := ret.Get(0).(func(routing.Routing) error); ok {
    55  		r0 = rf(r)
    56  	} else {
    57  		r0 = ret.Error(0)
    58  	}
    59  
    60  	return r0
    61  }
    62  
    63  type mockConstructorTestingTNewRoutable interface {
    64  	mock.TestingT
    65  	Cleanup(func())
    66  }
    67  
    68  // NewRoutable creates a new instance of Routable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    69  func NewRoutable(t mockConstructorTestingTNewRoutable) *Routable {
    70  	mock := &Routable{}
    71  	mock.Mock.Test(t)
    72  
    73  	t.Cleanup(func() { mock.AssertExpectations(t) })
    74  
    75  	return mock
    76  }