github.com/koko1123/flow-go-1@v0.29.6/engine/execution/computation/mock/computation_manager.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 context "context" 7 8 execution "github.com/koko1123/flow-go-1/engine/execution" 9 entity "github.com/koko1123/flow-go-1/module/mempool/entity" 10 11 flow "github.com/koko1123/flow-go-1/model/flow" 12 13 mock "github.com/stretchr/testify/mock" 14 15 state "github.com/koko1123/flow-go-1/fvm/state" 16 ) 17 18 // ComputationManager is an autogenerated mock type for the ComputationManager type 19 type ComputationManager struct { 20 mock.Mock 21 } 22 23 // ComputeBlock provides a mock function with given fields: ctx, block, view 24 func (_m *ComputationManager) ComputeBlock(ctx context.Context, block *entity.ExecutableBlock, view state.View) (*execution.ComputationResult, error) { 25 ret := _m.Called(ctx, block, view) 26 27 var r0 *execution.ComputationResult 28 if rf, ok := ret.Get(0).(func(context.Context, *entity.ExecutableBlock, state.View) *execution.ComputationResult); ok { 29 r0 = rf(ctx, block, view) 30 } else { 31 if ret.Get(0) != nil { 32 r0 = ret.Get(0).(*execution.ComputationResult) 33 } 34 } 35 36 var r1 error 37 if rf, ok := ret.Get(1).(func(context.Context, *entity.ExecutableBlock, state.View) error); ok { 38 r1 = rf(ctx, block, view) 39 } else { 40 r1 = ret.Error(1) 41 } 42 43 return r0, r1 44 } 45 46 // ExecuteScript provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4 47 func (_m *ComputationManager) ExecuteScript(_a0 context.Context, _a1 []byte, _a2 [][]byte, _a3 *flow.Header, _a4 state.View) ([]byte, error) { 48 ret := _m.Called(_a0, _a1, _a2, _a3, _a4) 49 50 var r0 []byte 51 if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte, *flow.Header, state.View) []byte); ok { 52 r0 = rf(_a0, _a1, _a2, _a3, _a4) 53 } else { 54 if ret.Get(0) != nil { 55 r0 = ret.Get(0).([]byte) 56 } 57 } 58 59 var r1 error 60 if rf, ok := ret.Get(1).(func(context.Context, []byte, [][]byte, *flow.Header, state.View) error); ok { 61 r1 = rf(_a0, _a1, _a2, _a3, _a4) 62 } else { 63 r1 = ret.Error(1) 64 } 65 66 return r0, r1 67 } 68 69 // GetAccount provides a mock function with given fields: addr, header, view 70 func (_m *ComputationManager) GetAccount(addr flow.Address, header *flow.Header, view state.View) (*flow.Account, error) { 71 ret := _m.Called(addr, header, view) 72 73 var r0 *flow.Account 74 if rf, ok := ret.Get(0).(func(flow.Address, *flow.Header, state.View) *flow.Account); ok { 75 r0 = rf(addr, header, view) 76 } else { 77 if ret.Get(0) != nil { 78 r0 = ret.Get(0).(*flow.Account) 79 } 80 } 81 82 var r1 error 83 if rf, ok := ret.Get(1).(func(flow.Address, *flow.Header, state.View) error); ok { 84 r1 = rf(addr, header, view) 85 } else { 86 r1 = ret.Error(1) 87 } 88 89 return r0, r1 90 } 91 92 type mockConstructorTestingTNewComputationManager interface { 93 mock.TestingT 94 Cleanup(func()) 95 } 96 97 // NewComputationManager creates a new instance of ComputationManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 98 func NewComputationManager(t mockConstructorTestingTNewComputationManager) *ComputationManager { 99 mock := &ComputationManager{} 100 mock.Mock.Test(t) 101 102 t.Cleanup(func() { mock.AssertExpectations(t) }) 103 104 return mock 105 }