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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mockp2p
     4  
     5  import (
     6  	network "github.com/onflow/flow-go/network"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	peer "github.com/libp2p/go-libp2p/core/peer"
    10  )
    11  
    12  // DisallowListOracle is an autogenerated mock type for the DisallowListOracle type
    13  type DisallowListOracle struct {
    14  	mock.Mock
    15  }
    16  
    17  // IsDisallowListed provides a mock function with given fields: peerId
    18  func (_m *DisallowListOracle) IsDisallowListed(peerId peer.ID) ([]network.DisallowListedCause, bool) {
    19  	ret := _m.Called(peerId)
    20  
    21  	var r0 []network.DisallowListedCause
    22  	var r1 bool
    23  	if rf, ok := ret.Get(0).(func(peer.ID) ([]network.DisallowListedCause, bool)); ok {
    24  		return rf(peerId)
    25  	}
    26  	if rf, ok := ret.Get(0).(func(peer.ID) []network.DisallowListedCause); ok {
    27  		r0 = rf(peerId)
    28  	} else {
    29  		if ret.Get(0) != nil {
    30  			r0 = ret.Get(0).([]network.DisallowListedCause)
    31  		}
    32  	}
    33  
    34  	if rf, ok := ret.Get(1).(func(peer.ID) bool); ok {
    35  		r1 = rf(peerId)
    36  	} else {
    37  		r1 = ret.Get(1).(bool)
    38  	}
    39  
    40  	return r0, r1
    41  }
    42  
    43  type mockConstructorTestingTNewDisallowListOracle interface {
    44  	mock.TestingT
    45  	Cleanup(func())
    46  }
    47  
    48  // NewDisallowListOracle creates a new instance of DisallowListOracle. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    49  func NewDisallowListOracle(t mockConstructorTestingTNewDisallowListOracle) *DisallowListOracle {
    50  	mock := &DisallowListOracle{}
    51  	mock.Mock.Test(t)
    52  
    53  	t.Cleanup(func() { mock.AssertExpectations(t) })
    54  
    55  	return mock
    56  }