github.com/koko1123/flow-go-1@v0.29.6/network/mocknetwork/overlay.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  	network "github.com/koko1123/flow-go-1/network"
    10  
    11  	peer "github.com/libp2p/go-libp2p/core/peer"
    12  )
    13  
    14  // Overlay is an autogenerated mock type for the Overlay type
    15  type Overlay struct {
    16  	mock.Mock
    17  }
    18  
    19  // Identities provides a mock function with given fields:
    20  func (_m *Overlay) Identities() flow.IdentityList {
    21  	ret := _m.Called()
    22  
    23  	var r0 flow.IdentityList
    24  	if rf, ok := ret.Get(0).(func() flow.IdentityList); ok {
    25  		r0 = rf()
    26  	} else {
    27  		if ret.Get(0) != nil {
    28  			r0 = ret.Get(0).(flow.IdentityList)
    29  		}
    30  	}
    31  
    32  	return r0
    33  }
    34  
    35  // Identity provides a mock function with given fields: _a0
    36  func (_m *Overlay) Identity(_a0 peer.ID) (*flow.Identity, bool) {
    37  	ret := _m.Called(_a0)
    38  
    39  	var r0 *flow.Identity
    40  	if rf, ok := ret.Get(0).(func(peer.ID) *flow.Identity); ok {
    41  		r0 = rf(_a0)
    42  	} else {
    43  		if ret.Get(0) != nil {
    44  			r0 = ret.Get(0).(*flow.Identity)
    45  		}
    46  	}
    47  
    48  	var r1 bool
    49  	if rf, ok := ret.Get(1).(func(peer.ID) bool); ok {
    50  		r1 = rf(_a0)
    51  	} else {
    52  		r1 = ret.Get(1).(bool)
    53  	}
    54  
    55  	return r0, r1
    56  }
    57  
    58  // Receive provides a mock function with given fields: _a0
    59  func (_m *Overlay) Receive(_a0 *network.IncomingMessageScope) error {
    60  	ret := _m.Called(_a0)
    61  
    62  	var r0 error
    63  	if rf, ok := ret.Get(0).(func(*network.IncomingMessageScope) error); ok {
    64  		r0 = rf(_a0)
    65  	} else {
    66  		r0 = ret.Error(0)
    67  	}
    68  
    69  	return r0
    70  }
    71  
    72  // Topology provides a mock function with given fields:
    73  func (_m *Overlay) Topology() flow.IdentityList {
    74  	ret := _m.Called()
    75  
    76  	var r0 flow.IdentityList
    77  	if rf, ok := ret.Get(0).(func() flow.IdentityList); ok {
    78  		r0 = rf()
    79  	} else {
    80  		if ret.Get(0) != nil {
    81  			r0 = ret.Get(0).(flow.IdentityList)
    82  		}
    83  	}
    84  
    85  	return r0
    86  }
    87  
    88  type mockConstructorTestingTNewOverlay interface {
    89  	mock.TestingT
    90  	Cleanup(func())
    91  }
    92  
    93  // 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.
    94  func NewOverlay(t mockConstructorTestingTNewOverlay) *Overlay {
    95  	mock := &Overlay{}
    96  	mock.Mock.Test(t)
    97  
    98  	t.Cleanup(func() { mock.AssertExpectations(t) })
    99  
   100  	return mock
   101  }