github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/internal/p2p/mocks/transport.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	conn "github.com/ari-anchor/sei-tendermint/internal/p2p/conn"
     9  
    10  	mock "github.com/stretchr/testify/mock"
    11  
    12  	p2p "github.com/ari-anchor/sei-tendermint/internal/p2p"
    13  )
    14  
    15  // Transport is an autogenerated mock type for the Transport type
    16  type Transport struct {
    17  	mock.Mock
    18  }
    19  
    20  // Accept provides a mock function with given fields: _a0
    21  func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error) {
    22  	ret := _m.Called(_a0)
    23  
    24  	var r0 p2p.Connection
    25  	if rf, ok := ret.Get(0).(func(context.Context) p2p.Connection); ok {
    26  		r0 = rf(_a0)
    27  	} else {
    28  		if ret.Get(0) != nil {
    29  			r0 = ret.Get(0).(p2p.Connection)
    30  		}
    31  	}
    32  
    33  	var r1 error
    34  	if rf, ok := ret.Get(1).(func(context.Context) error); ok {
    35  		r1 = rf(_a0)
    36  	} else {
    37  		r1 = ret.Error(1)
    38  	}
    39  
    40  	return r0, r1
    41  }
    42  
    43  // AddChannelDescriptors provides a mock function with given fields: _a0
    44  func (_m *Transport) AddChannelDescriptors(_a0 []*conn.ChannelDescriptor) {
    45  	_m.Called(_a0)
    46  }
    47  
    48  // Close provides a mock function with given fields:
    49  func (_m *Transport) Close() error {
    50  	ret := _m.Called()
    51  
    52  	var r0 error
    53  	if rf, ok := ret.Get(0).(func() error); ok {
    54  		r0 = rf()
    55  	} else {
    56  		r0 = ret.Error(0)
    57  	}
    58  
    59  	return r0
    60  }
    61  
    62  // Dial provides a mock function with given fields: _a0, _a1
    63  func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connection, error) {
    64  	ret := _m.Called(_a0, _a1)
    65  
    66  	var r0 p2p.Connection
    67  	if rf, ok := ret.Get(0).(func(context.Context, *p2p.Endpoint) p2p.Connection); ok {
    68  		r0 = rf(_a0, _a1)
    69  	} else {
    70  		if ret.Get(0) != nil {
    71  			r0 = ret.Get(0).(p2p.Connection)
    72  		}
    73  	}
    74  
    75  	var r1 error
    76  	if rf, ok := ret.Get(1).(func(context.Context, *p2p.Endpoint) error); ok {
    77  		r1 = rf(_a0, _a1)
    78  	} else {
    79  		r1 = ret.Error(1)
    80  	}
    81  
    82  	return r0, r1
    83  }
    84  
    85  // Endpoint provides a mock function with given fields:
    86  func (_m *Transport) Endpoint() (*p2p.Endpoint, error) {
    87  	ret := _m.Called()
    88  
    89  	var r0 *p2p.Endpoint
    90  	if rf, ok := ret.Get(0).(func() *p2p.Endpoint); ok {
    91  		r0 = rf()
    92  	} else {
    93  		if ret.Get(0) != nil {
    94  			r0 = ret.Get(0).(*p2p.Endpoint)
    95  		}
    96  	}
    97  
    98  	var r1 error
    99  	if rf, ok := ret.Get(1).(func() error); ok {
   100  		r1 = rf()
   101  	} else {
   102  		r1 = ret.Error(1)
   103  	}
   104  
   105  	return r0, r1
   106  }
   107  
   108  // Listen provides a mock function with given fields: _a0
   109  func (_m *Transport) Listen(_a0 *p2p.Endpoint) error {
   110  	ret := _m.Called(_a0)
   111  
   112  	var r0 error
   113  	if rf, ok := ret.Get(0).(func(*p2p.Endpoint) error); ok {
   114  		r0 = rf(_a0)
   115  	} else {
   116  		r0 = ret.Error(0)
   117  	}
   118  
   119  	return r0
   120  }
   121  
   122  // Protocols provides a mock function with given fields:
   123  func (_m *Transport) Protocols() []p2p.Protocol {
   124  	ret := _m.Called()
   125  
   126  	var r0 []p2p.Protocol
   127  	if rf, ok := ret.Get(0).(func() []p2p.Protocol); ok {
   128  		r0 = rf()
   129  	} else {
   130  		if ret.Get(0) != nil {
   131  			r0 = ret.Get(0).([]p2p.Protocol)
   132  		}
   133  	}
   134  
   135  	return r0
   136  }
   137  
   138  // String provides a mock function with given fields:
   139  func (_m *Transport) String() string {
   140  	ret := _m.Called()
   141  
   142  	var r0 string
   143  	if rf, ok := ret.Get(0).(func() string); ok {
   144  		r0 = rf()
   145  	} else {
   146  		r0 = ret.Get(0).(string)
   147  	}
   148  
   149  	return r0
   150  }
   151  
   152  type mockConstructorTestingTNewTransport interface {
   153  	mock.TestingT
   154  	Cleanup(func())
   155  }
   156  
   157  // NewTransport creates a new instance of Transport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   158  func NewTransport(t mockConstructorTestingTNewTransport) *Transport {
   159  	mock := &Transport{}
   160  	mock.Mock.Test(t)
   161  
   162  	t.Cleanup(func() { mock.AssertExpectations(t) })
   163  
   164  	return mock
   165  }