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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mockp2p
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  	irrecoverable "github.com/onflow/flow-go/module/irrecoverable"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  
    11  	peer "github.com/libp2p/go-libp2p/core/peer"
    12  )
    13  
    14  // SubscriptionValidator is an autogenerated mock type for the SubscriptionValidator type
    15  type SubscriptionValidator struct {
    16  	mock.Mock
    17  }
    18  
    19  // CheckSubscribedToAllowedTopics provides a mock function with given fields: pid, role
    20  func (_m *SubscriptionValidator) CheckSubscribedToAllowedTopics(pid peer.ID, role flow.Role) error {
    21  	ret := _m.Called(pid, role)
    22  
    23  	var r0 error
    24  	if rf, ok := ret.Get(0).(func(peer.ID, flow.Role) error); ok {
    25  		r0 = rf(pid, role)
    26  	} else {
    27  		r0 = ret.Error(0)
    28  	}
    29  
    30  	return r0
    31  }
    32  
    33  // Done provides a mock function with given fields:
    34  func (_m *SubscriptionValidator) Done() <-chan struct{} {
    35  	ret := _m.Called()
    36  
    37  	var r0 <-chan struct{}
    38  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    39  		r0 = rf()
    40  	} else {
    41  		if ret.Get(0) != nil {
    42  			r0 = ret.Get(0).(<-chan struct{})
    43  		}
    44  	}
    45  
    46  	return r0
    47  }
    48  
    49  // Ready provides a mock function with given fields:
    50  func (_m *SubscriptionValidator) Ready() <-chan struct{} {
    51  	ret := _m.Called()
    52  
    53  	var r0 <-chan struct{}
    54  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    55  		r0 = rf()
    56  	} else {
    57  		if ret.Get(0) != nil {
    58  			r0 = ret.Get(0).(<-chan struct{})
    59  		}
    60  	}
    61  
    62  	return r0
    63  }
    64  
    65  // Start provides a mock function with given fields: _a0
    66  func (_m *SubscriptionValidator) Start(_a0 irrecoverable.SignalerContext) {
    67  	_m.Called(_a0)
    68  }
    69  
    70  type mockConstructorTestingTNewSubscriptionValidator interface {
    71  	mock.TestingT
    72  	Cleanup(func())
    73  }
    74  
    75  // NewSubscriptionValidator creates a new instance of SubscriptionValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    76  func NewSubscriptionValidator(t mockConstructorTestingTNewSubscriptionValidator) *SubscriptionValidator {
    77  	mock := &SubscriptionValidator{}
    78  	mock.Mock.Test(t)
    79  
    80  	t.Cleanup(func() { mock.AssertExpectations(t) })
    81  
    82  	return mock
    83  }