github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/fvm/environment/mock/contract_function_invoker.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	cadence "github.com/onflow/cadence"
     7  	environment "github.com/onflow/flow-go/fvm/environment"
     8  	mock "github.com/stretchr/testify/mock"
     9  )
    10  
    11  // ContractFunctionInvoker is an autogenerated mock type for the ContractFunctionInvoker type
    12  type ContractFunctionInvoker struct {
    13  	mock.Mock
    14  }
    15  
    16  // Invoke provides a mock function with given fields: spec, arguments
    17  func (_m *ContractFunctionInvoker) Invoke(spec environment.ContractFunctionSpec, arguments []cadence.Value) (cadence.Value, error) {
    18  	ret := _m.Called(spec, arguments)
    19  
    20  	var r0 cadence.Value
    21  	var r1 error
    22  	if rf, ok := ret.Get(0).(func(environment.ContractFunctionSpec, []cadence.Value) (cadence.Value, error)); ok {
    23  		return rf(spec, arguments)
    24  	}
    25  	if rf, ok := ret.Get(0).(func(environment.ContractFunctionSpec, []cadence.Value) cadence.Value); ok {
    26  		r0 = rf(spec, arguments)
    27  	} else {
    28  		if ret.Get(0) != nil {
    29  			r0 = ret.Get(0).(cadence.Value)
    30  		}
    31  	}
    32  
    33  	if rf, ok := ret.Get(1).(func(environment.ContractFunctionSpec, []cadence.Value) error); ok {
    34  		r1 = rf(spec, arguments)
    35  	} else {
    36  		r1 = ret.Error(1)
    37  	}
    38  
    39  	return r0, r1
    40  }
    41  
    42  type mockConstructorTestingTNewContractFunctionInvoker interface {
    43  	mock.TestingT
    44  	Cleanup(func())
    45  }
    46  
    47  // NewContractFunctionInvoker creates a new instance of ContractFunctionInvoker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    48  func NewContractFunctionInvoker(t mockConstructorTestingTNewContractFunctionInvoker) *ContractFunctionInvoker {
    49  	mock := &ContractFunctionInvoker{}
    50  	mock.Mock.Test(t)
    51  
    52  	t.Cleanup(func() { mock.AssertExpectations(t) })
    53  
    54  	return mock
    55  }