github.com/koko1123/flow-go-1@v0.29.6/network/p2p/mock/subscription_provider.go (about)

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