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

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	common "github.com/onflow/cadence/runtime/common"
     7  	environment "github.com/onflow/flow-go/fvm/environment"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // ContractUpdater is an autogenerated mock type for the ContractUpdater type
    13  type ContractUpdater struct {
    14  	mock.Mock
    15  }
    16  
    17  // Commit provides a mock function with given fields:
    18  func (_m *ContractUpdater) Commit() (environment.ContractUpdates, error) {
    19  	ret := _m.Called()
    20  
    21  	var r0 environment.ContractUpdates
    22  	var r1 error
    23  	if rf, ok := ret.Get(0).(func() (environment.ContractUpdates, error)); ok {
    24  		return rf()
    25  	}
    26  	if rf, ok := ret.Get(0).(func() environment.ContractUpdates); ok {
    27  		r0 = rf()
    28  	} else {
    29  		r0 = ret.Get(0).(environment.ContractUpdates)
    30  	}
    31  
    32  	if rf, ok := ret.Get(1).(func() error); ok {
    33  		r1 = rf()
    34  	} else {
    35  		r1 = ret.Error(1)
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  // RemoveAccountContractCode provides a mock function with given fields: location
    42  func (_m *ContractUpdater) RemoveAccountContractCode(location common.AddressLocation) error {
    43  	ret := _m.Called(location)
    44  
    45  	var r0 error
    46  	if rf, ok := ret.Get(0).(func(common.AddressLocation) error); ok {
    47  		r0 = rf(location)
    48  	} else {
    49  		r0 = ret.Error(0)
    50  	}
    51  
    52  	return r0
    53  }
    54  
    55  // Reset provides a mock function with given fields:
    56  func (_m *ContractUpdater) Reset() {
    57  	_m.Called()
    58  }
    59  
    60  // UpdateAccountContractCode provides a mock function with given fields: location, code
    61  func (_m *ContractUpdater) UpdateAccountContractCode(location common.AddressLocation, code []byte) error {
    62  	ret := _m.Called(location, code)
    63  
    64  	var r0 error
    65  	if rf, ok := ret.Get(0).(func(common.AddressLocation, []byte) error); ok {
    66  		r0 = rf(location, code)
    67  	} else {
    68  		r0 = ret.Error(0)
    69  	}
    70  
    71  	return r0
    72  }
    73  
    74  type mockConstructorTestingTNewContractUpdater interface {
    75  	mock.TestingT
    76  	Cleanup(func())
    77  }
    78  
    79  // NewContractUpdater creates a new instance of ContractUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    80  func NewContractUpdater(t mockConstructorTestingTNewContractUpdater) *ContractUpdater {
    81  	mock := &ContractUpdater{}
    82  	mock.Mock.Test(t)
    83  
    84  	t.Cleanup(func() { mock.AssertExpectations(t) })
    85  
    86  	return mock
    87  }