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