github.com/koko1123/flow-go-1@v0.29.6/network/mocknetwork/engine.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mocknetwork 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/model/flow" 7 channels "github.com/koko1123/flow-go-1/network/channels" 8 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // Engine is an autogenerated mock type for the Engine type 13 type Engine struct { 14 mock.Mock 15 } 16 17 // Done provides a mock function with given fields: 18 func (_m *Engine) Done() <-chan struct{} { 19 ret := _m.Called() 20 21 var r0 <-chan struct{} 22 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 23 r0 = rf() 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(<-chan struct{}) 27 } 28 } 29 30 return r0 31 } 32 33 // Process provides a mock function with given fields: channel, originID, event 34 func (_m *Engine) Process(channel channels.Channel, originID flow.Identifier, event interface{}) error { 35 ret := _m.Called(channel, originID, event) 36 37 var r0 error 38 if rf, ok := ret.Get(0).(func(channels.Channel, flow.Identifier, interface{}) error); ok { 39 r0 = rf(channel, originID, event) 40 } else { 41 r0 = ret.Error(0) 42 } 43 44 return r0 45 } 46 47 // ProcessLocal provides a mock function with given fields: event 48 func (_m *Engine) ProcessLocal(event interface{}) error { 49 ret := _m.Called(event) 50 51 var r0 error 52 if rf, ok := ret.Get(0).(func(interface{}) error); ok { 53 r0 = rf(event) 54 } else { 55 r0 = ret.Error(0) 56 } 57 58 return r0 59 } 60 61 // Ready provides a mock function with given fields: 62 func (_m *Engine) Ready() <-chan struct{} { 63 ret := _m.Called() 64 65 var r0 <-chan struct{} 66 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 67 r0 = rf() 68 } else { 69 if ret.Get(0) != nil { 70 r0 = ret.Get(0).(<-chan struct{}) 71 } 72 } 73 74 return r0 75 } 76 77 // Submit provides a mock function with given fields: channel, originID, event 78 func (_m *Engine) Submit(channel channels.Channel, originID flow.Identifier, event interface{}) { 79 _m.Called(channel, originID, event) 80 } 81 82 // SubmitLocal provides a mock function with given fields: event 83 func (_m *Engine) SubmitLocal(event interface{}) { 84 _m.Called(event) 85 } 86 87 type mockConstructorTestingTNewEngine interface { 88 mock.TestingT 89 Cleanup(func()) 90 } 91 92 // NewEngine creates a new instance of Engine. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 93 func NewEngine(t mockConstructorTestingTNewEngine) *Engine { 94 mock := &Engine{} 95 mock.Mock.Test(t) 96 97 t.Cleanup(func() { mock.AssertExpectations(t) }) 98 99 return mock 100 }