github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/middleware.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  	channels "github.com/onflow/flow-go/network/channels"
     9  
    10  	network "github.com/onflow/flow-go/network"
    11  )
    12  
    13  // Middleware is an autogenerated mock type for the Middleware type
    14  type Middleware struct {
    15  	mock.Mock
    16  }
    17  
    18  // Done provides a mock function with given fields:
    19  func (_m *Middleware) Done() <-chan struct{} {
    20  	ret := _m.Called()
    21  
    22  	var r0 <-chan struct{}
    23  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    24  		r0 = rf()
    25  	} else {
    26  		if ret.Get(0) != nil {
    27  			r0 = ret.Get(0).(<-chan struct{})
    28  		}
    29  	}
    30  
    31  	return r0
    32  }
    33  
    34  // OnAllowListNotification provides a mock function with given fields: _a0
    35  func (_m *Middleware) OnAllowListNotification(_a0 *network.AllowListingUpdate) {
    36  	_m.Called(_a0)
    37  }
    38  
    39  // OnDisallowListNotification provides a mock function with given fields: _a0
    40  func (_m *Middleware) OnDisallowListNotification(_a0 *network.DisallowListingUpdate) {
    41  	_m.Called(_a0)
    42  }
    43  
    44  // Ready provides a mock function with given fields:
    45  func (_m *Middleware) Ready() <-chan struct{} {
    46  	ret := _m.Called()
    47  
    48  	var r0 <-chan struct{}
    49  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    50  		r0 = rf()
    51  	} else {
    52  		if ret.Get(0) != nil {
    53  			r0 = ret.Get(0).(<-chan struct{})
    54  		}
    55  	}
    56  
    57  	return r0
    58  }
    59  
    60  // Subscribe provides a mock function with given fields: channel
    61  func (_m *Middleware) Subscribe(channel channels.Channel) error {
    62  	ret := _m.Called(channel)
    63  
    64  	var r0 error
    65  	if rf, ok := ret.Get(0).(func(channels.Channel) error); ok {
    66  		r0 = rf(channel)
    67  	} else {
    68  		r0 = ret.Error(0)
    69  	}
    70  
    71  	return r0
    72  }
    73  
    74  // Unsubscribe provides a mock function with given fields: channel
    75  func (_m *Middleware) Unsubscribe(channel channels.Channel) error {
    76  	ret := _m.Called(channel)
    77  
    78  	var r0 error
    79  	if rf, ok := ret.Get(0).(func(channels.Channel) error); ok {
    80  		r0 = rf(channel)
    81  	} else {
    82  		r0 = ret.Error(0)
    83  	}
    84  
    85  	return r0
    86  }
    87  
    88  // UpdateNodeAddresses provides a mock function with given fields:
    89  func (_m *Middleware) UpdateNodeAddresses() {
    90  	_m.Called()
    91  }
    92  
    93  type mockConstructorTestingTNewMiddleware interface {
    94  	mock.TestingT
    95  	Cleanup(func())
    96  }
    97  
    98  // NewMiddleware creates a new instance of Middleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    99  func NewMiddleware(t mockConstructorTestingTNewMiddleware) *Middleware {
   100  	mock := &Middleware{}
   101  	mock.Mock.Test(t)
   102  
   103  	t.Cleanup(func() { mock.AssertExpectations(t) })
   104  
   105  	return mock
   106  }