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