github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/engine/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  // ExecuteScriptAtBlockID provides a mock function with given fields: ctx, script, arguments, blockID
    19  func (_m *ScriptExecutor) ExecuteScriptAtBlockID(ctx context.Context, script []byte, arguments [][]byte, blockID flow.Identifier) ([]byte, uint64, error) {
    20  	ret := _m.Called(ctx, script, arguments, blockID)
    21  
    22  	var r0 []byte
    23  	var r1 uint64
    24  	var r2 error
    25  	if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte, flow.Identifier) ([]byte, uint64, error)); ok {
    26  		return rf(ctx, script, arguments, blockID)
    27  	}
    28  	if rf, ok := ret.Get(0).(func(context.Context, []byte, [][]byte, flow.Identifier) []byte); ok {
    29  		r0 = rf(ctx, script, arguments, blockID)
    30  	} else {
    31  		if ret.Get(0) != nil {
    32  			r0 = ret.Get(0).([]byte)
    33  		}
    34  	}
    35  
    36  	if rf, ok := ret.Get(1).(func(context.Context, []byte, [][]byte, flow.Identifier) uint64); ok {
    37  		r1 = rf(ctx, script, arguments, blockID)
    38  	} else {
    39  		r1 = ret.Get(1).(uint64)
    40  	}
    41  
    42  	if rf, ok := ret.Get(2).(func(context.Context, []byte, [][]byte, flow.Identifier) error); ok {
    43  		r2 = rf(ctx, script, arguments, blockID)
    44  	} else {
    45  		r2 = ret.Error(2)
    46  	}
    47  
    48  	return r0, r1, r2
    49  }
    50  
    51  // GetAccount provides a mock function with given fields: ctx, address, blockID
    52  func (_m *ScriptExecutor) GetAccount(ctx context.Context, address flow.Address, blockID flow.Identifier) (*flow.Account, error) {
    53  	ret := _m.Called(ctx, address, blockID)
    54  
    55  	var r0 *flow.Account
    56  	var r1 error
    57  	if rf, ok := ret.Get(0).(func(context.Context, flow.Address, flow.Identifier) (*flow.Account, error)); ok {
    58  		return rf(ctx, address, blockID)
    59  	}
    60  	if rf, ok := ret.Get(0).(func(context.Context, flow.Address, flow.Identifier) *flow.Account); ok {
    61  		r0 = rf(ctx, address, blockID)
    62  	} else {
    63  		if ret.Get(0) != nil {
    64  			r0 = ret.Get(0).(*flow.Account)
    65  		}
    66  	}
    67  
    68  	if rf, ok := ret.Get(1).(func(context.Context, flow.Address, flow.Identifier) error); ok {
    69  		r1 = rf(ctx, address, blockID)
    70  	} else {
    71  		r1 = ret.Error(1)
    72  	}
    73  
    74  	return r0, r1
    75  }
    76  
    77  // GetRegisterAtBlockID provides a mock function with given fields: ctx, owner, key, blockID
    78  func (_m *ScriptExecutor) GetRegisterAtBlockID(ctx context.Context, owner []byte, key []byte, blockID flow.Identifier) ([]byte, error) {
    79  	ret := _m.Called(ctx, owner, key, blockID)
    80  
    81  	var r0 []byte
    82  	var r1 error
    83  	if rf, ok := ret.Get(0).(func(context.Context, []byte, []byte, flow.Identifier) ([]byte, error)); ok {
    84  		return rf(ctx, owner, key, blockID)
    85  	}
    86  	if rf, ok := ret.Get(0).(func(context.Context, []byte, []byte, flow.Identifier) []byte); ok {
    87  		r0 = rf(ctx, owner, key, blockID)
    88  	} else {
    89  		if ret.Get(0) != nil {
    90  			r0 = ret.Get(0).([]byte)
    91  		}
    92  	}
    93  
    94  	if rf, ok := ret.Get(1).(func(context.Context, []byte, []byte, flow.Identifier) error); ok {
    95  		r1 = rf(ctx, owner, key, blockID)
    96  	} else {
    97  		r1 = ret.Error(1)
    98  	}
    99  
   100  	return r0, r1
   101  }
   102  
   103  type mockConstructorTestingTNewScriptExecutor interface {
   104  	mock.TestingT
   105  	Cleanup(func())
   106  }
   107  
   108  // 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.
   109  func NewScriptExecutor(t mockConstructorTestingTNewScriptExecutor) *ScriptExecutor {
   110  	mock := &ScriptExecutor{}
   111  	mock.Mock.Test(t)
   112  
   113  	t.Cleanup(func() { mock.AssertExpectations(t) })
   114  
   115  	return mock
   116  }