github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/execution/computation/query/mock/executor.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 flow "github.com/onflow/flow-go/model/flow" 9 mock "github.com/stretchr/testify/mock" 10 11 snapshot "github.com/onflow/flow-go/fvm/storage/snapshot" 12 ) 13 14 // Executor is an autogenerated mock type for the Executor type 15 type Executor struct { 16 mock.Mock 17 } 18 19 // ExecuteScript provides a mock function with given fields: ctx, script, arguments, blockHeader, _a4 20 func (_m *Executor) ExecuteScript(ctx context.Context, script []byte, arguments [][]byte, blockHeader *flow.Header, _a4 snapshot.StorageSnapshot) ([]byte, uint64, error) { 21 ret := _m.Called(ctx, script, arguments, blockHeader, _a4) 22 23 var r0 []byte 24 var r1 uint64 25 var r2 error 26 if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte, *flow.Header, snapshot.StorageSnapshot) ([]byte, uint64, error)); ok { 27 return rf(ctx, script, arguments, blockHeader, _a4) 28 } 29 if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte, *flow.Header, snapshot.StorageSnapshot) []byte); ok { 30 r0 = rf(ctx, script, arguments, blockHeader, _a4) 31 } else { 32 if ret.Get(0) != nil { 33 r0 = ret.Get(0).([]byte) 34 } 35 } 36 37 if rf, ok := ret.Get(1).(func(context.Context, []byte, [][]byte, *flow.Header, snapshot.StorageSnapshot) uint64); ok { 38 r1 = rf(ctx, script, arguments, blockHeader, _a4) 39 } else { 40 r1 = ret.Get(1).(uint64) 41 } 42 43 if rf, ok := ret.Get(2).(func(context.Context, []byte, [][]byte, *flow.Header, snapshot.StorageSnapshot) error); ok { 44 r2 = rf(ctx, script, arguments, blockHeader, _a4) 45 } else { 46 r2 = ret.Error(2) 47 } 48 49 return r0, r1, r2 50 } 51 52 // GetAccount provides a mock function with given fields: ctx, addr, header, _a3 53 func (_m *Executor) GetAccount(ctx context.Context, addr flow.Address, header *flow.Header, _a3 snapshot.StorageSnapshot) (*flow.Account, error) { 54 ret := _m.Called(ctx, addr, header, _a3) 55 56 var r0 *flow.Account 57 var r1 error 58 if rf, ok := ret.Get(0).(func(context.Context, flow.Address, *flow.Header, snapshot.StorageSnapshot) (*flow.Account, error)); ok { 59 return rf(ctx, addr, header, _a3) 60 } 61 if rf, ok := ret.Get(0).(func(context.Context, flow.Address, *flow.Header, snapshot.StorageSnapshot) *flow.Account); ok { 62 r0 = rf(ctx, addr, header, _a3) 63 } else { 64 if ret.Get(0) != nil { 65 r0 = ret.Get(0).(*flow.Account) 66 } 67 } 68 69 if rf, ok := ret.Get(1).(func(context.Context, flow.Address, *flow.Header, snapshot.StorageSnapshot) error); ok { 70 r1 = rf(ctx, addr, header, _a3) 71 } else { 72 r1 = ret.Error(1) 73 } 74 75 return r0, r1 76 } 77 78 type mockConstructorTestingTNewExecutor interface { 79 mock.TestingT 80 Cleanup(func()) 81 } 82 83 // NewExecutor creates a new instance of Executor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 84 func NewExecutor(t mockConstructorTestingTNewExecutor) *Executor { 85 mock := &Executor{} 86 mock.Mock.Test(t) 87 88 t.Cleanup(func() { mock.AssertExpectations(t) }) 89 90 return mock 91 }