github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/topic_validator_func.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 context "context" 7 8 p2p "github.com/onflow/flow-go/network/p2p" 9 mock "github.com/stretchr/testify/mock" 10 11 peer "github.com/libp2p/go-libp2p/core/peer" 12 13 pubsub "github.com/libp2p/go-libp2p-pubsub" 14 ) 15 16 // TopicValidatorFunc is an autogenerated mock type for the TopicValidatorFunc type 17 type TopicValidatorFunc struct { 18 mock.Mock 19 } 20 21 // Execute provides a mock function with given fields: _a0, _a1, _a2 22 func (_m *TopicValidatorFunc) Execute(_a0 context.Context, _a1 peer.ID, _a2 *pubsub.Message) p2p.ValidationResult { 23 ret := _m.Called(_a0, _a1, _a2) 24 25 var r0 p2p.ValidationResult 26 if rf, ok := ret.Get(0).(func(context.Context, peer.ID, *pubsub.Message) p2p.ValidationResult); ok { 27 r0 = rf(_a0, _a1, _a2) 28 } else { 29 r0 = ret.Get(0).(p2p.ValidationResult) 30 } 31 32 return r0 33 } 34 35 type mockConstructorTestingTNewTopicValidatorFunc interface { 36 mock.TestingT 37 Cleanup(func()) 38 } 39 40 // NewTopicValidatorFunc creates a new instance of TopicValidatorFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 41 func NewTopicValidatorFunc(t mockConstructorTestingTNewTopicValidatorFunc) *TopicValidatorFunc { 42 mock := &TopicValidatorFunc{} 43 mock.Mock.Test(t) 44 45 t.Cleanup(func() { mock.AssertExpectations(t) }) 46 47 return mock 48 }