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