github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/peer_scoring_builder.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 channels "github.com/onflow/flow-go/network/channels" 9 10 peer "github.com/libp2p/go-libp2p/core/peer" 11 12 pubsub "github.com/libp2p/go-libp2p-pubsub" 13 ) 14 15 // PeerScoringBuilder is an autogenerated mock type for the PeerScoringBuilder type 16 type PeerScoringBuilder struct { 17 mock.Mock 18 } 19 20 // SetAppSpecificScoreParams provides a mock function with given fields: _a0 21 func (_m *PeerScoringBuilder) SetAppSpecificScoreParams(_a0 func(peer.ID) float64) { 22 _m.Called(_a0) 23 } 24 25 // SetTopicScoreParams provides a mock function with given fields: topic, topicScoreParams 26 func (_m *PeerScoringBuilder) SetTopicScoreParams(topic channels.Topic, topicScoreParams *pubsub.TopicScoreParams) { 27 _m.Called(topic, topicScoreParams) 28 } 29 30 type mockConstructorTestingTNewPeerScoringBuilder interface { 31 mock.TestingT 32 Cleanup(func()) 33 } 34 35 // NewPeerScoringBuilder creates a new instance of PeerScoringBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 36 func NewPeerScoringBuilder(t mockConstructorTestingTNewPeerScoringBuilder) *PeerScoringBuilder { 37 mock := &PeerScoringBuilder{} 38 mock.Mock.Test(t) 39 40 t.Cleanup(func() { mock.AssertExpectations(t) }) 41 42 return mock 43 }