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

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