github.com/koko1123/flow-go-1@v0.29.6/fvm/environment/mock/account_key_reader.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 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: address 19 func (_m *AccountKeyReader) AccountKeysCount(address common.Address) (uint64, error) { 20 ret := _m.Called(address) 21 22 var r0 uint64 23 if rf, ok := ret.Get(0).(func(common.Address) uint64); ok { 24 r0 = rf(address) 25 } else { 26 r0 = ret.Get(0).(uint64) 27 } 28 29 var r1 error 30 if rf, ok := ret.Get(1).(func(common.Address) error); ok { 31 r1 = rf(address) 32 } else { 33 r1 = ret.Error(1) 34 } 35 36 return r0, r1 37 } 38 39 // GetAccountKey provides a mock function with given fields: address, keyIndex 40 func (_m *AccountKeyReader) GetAccountKey(address common.Address, keyIndex int) (*stdlib.AccountKey, error) { 41 ret := _m.Called(address, keyIndex) 42 43 var r0 *stdlib.AccountKey 44 if rf, ok := ret.Get(0).(func(common.Address, int) *stdlib.AccountKey); ok { 45 r0 = rf(address, keyIndex) 46 } else { 47 if ret.Get(0) != nil { 48 r0 = ret.Get(0).(*stdlib.AccountKey) 49 } 50 } 51 52 var r1 error 53 if rf, ok := ret.Get(1).(func(common.Address, int) error); ok { 54 r1 = rf(address, keyIndex) 55 } else { 56 r1 = ret.Error(1) 57 } 58 59 return r0, r1 60 } 61 62 type mockConstructorTestingTNewAccountKeyReader interface { 63 mock.TestingT 64 Cleanup(func()) 65 } 66 67 // 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. 68 func NewAccountKeyReader(t mockConstructorTestingTNewAccountKeyReader) *AccountKeyReader { 69 mock := &AccountKeyReader{} 70 mock.Mock.Test(t) 71 72 t.Cleanup(func() { mock.AssertExpectations(t) }) 73 74 return mock 75 }