github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/message_processor.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocknetwork 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 channels "github.com/onflow/flow-go/network/channels" 8 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // MessageProcessor is an autogenerated mock type for the MessageProcessor type 13 type MessageProcessor struct { 14 mock.Mock 15 } 16 17 // Process provides a mock function with given fields: channel, originID, message 18 func (_m *MessageProcessor) Process(channel channels.Channel, originID flow.Identifier, message interface{}) error { 19 ret := _m.Called(channel, originID, message) 20 21 var r0 error 22 if rf, ok := ret.Get(0).(func(channels.Channel, flow.Identifier, interface{}) error); ok { 23 r0 = rf(channel, originID, message) 24 } else { 25 r0 = ret.Error(0) 26 } 27 28 return r0 29 } 30 31 type mockConstructorTestingTNewMessageProcessor interface { 32 mock.TestingT 33 Cleanup(func()) 34 } 35 36 // NewMessageProcessor creates a new instance of MessageProcessor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 37 func NewMessageProcessor(t mockConstructorTestingTNewMessageProcessor) *MessageProcessor { 38 mock := &MessageProcessor{} 39 mock.Mock.Test(t) 40 41 t.Cleanup(func() { mock.AssertExpectations(t) }) 42 43 return mock 44 }