github.com/koko1123/flow-go-1@v0.29.6/fvm/environment/mock/contract_updater.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 common "github.com/onflow/cadence/runtime/common" 7 environment "github.com/koko1123/flow-go-1/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.ContractUpdateKey, error) { 19 ret := _m.Called() 20 21 var r0 []environment.ContractUpdateKey 22 if rf, ok := ret.Get(0).(func() []environment.ContractUpdateKey); ok { 23 r0 = rf() 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).([]environment.ContractUpdateKey) 27 } 28 } 29 30 var r1 error 31 if rf, ok := ret.Get(1).(func() error); ok { 32 r1 = rf() 33 } else { 34 r1 = ret.Error(1) 35 } 36 37 return r0, r1 38 } 39 40 // RemoveAccountContractCode provides a mock function with given fields: address, name 41 func (_m *ContractUpdater) RemoveAccountContractCode(address common.Address, name string) error { 42 ret := _m.Called(address, name) 43 44 var r0 error 45 if rf, ok := ret.Get(0).(func(common.Address, string) error); ok { 46 r0 = rf(address, name) 47 } else { 48 r0 = ret.Error(0) 49 } 50 51 return r0 52 } 53 54 // Reset provides a mock function with given fields: 55 func (_m *ContractUpdater) Reset() { 56 _m.Called() 57 } 58 59 // UpdateAccountContractCode provides a mock function with given fields: address, name, code 60 func (_m *ContractUpdater) UpdateAccountContractCode(address common.Address, name string, code []byte) error { 61 ret := _m.Called(address, name, code) 62 63 var r0 error 64 if rf, ok := ret.Get(0).(func(common.Address, string, []byte) error); ok { 65 r0 = rf(address, name, code) 66 } else { 67 r0 = ret.Error(0) 68 } 69 70 return r0 71 } 72 73 type mockConstructorTestingTNewContractUpdater interface { 74 mock.TestingT 75 Cleanup(func()) 76 } 77 78 // 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. 79 func NewContractUpdater(t mockConstructorTestingTNewContractUpdater) *ContractUpdater { 80 mock := &ContractUpdater{} 81 mock.Mock.Test(t) 82 83 t.Cleanup(func() { mock.AssertExpectations(t) }) 84 85 return mock 86 }