github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/mock/register_index.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/onflow/flow-go/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // RegisterIndex is an autogenerated mock type for the RegisterIndex type 11 type RegisterIndex struct { 12 mock.Mock 13 } 14 15 // FirstHeight provides a mock function with given fields: 16 func (_m *RegisterIndex) FirstHeight() uint64 { 17 ret := _m.Called() 18 19 var r0 uint64 20 if rf, ok := ret.Get(0).(func() uint64); ok { 21 r0 = rf() 22 } else { 23 r0 = ret.Get(0).(uint64) 24 } 25 26 return r0 27 } 28 29 // Get provides a mock function with given fields: ID, height 30 func (_m *RegisterIndex) Get(ID flow.RegisterID, height uint64) ([]byte, error) { 31 ret := _m.Called(ID, height) 32 33 var r0 []byte 34 var r1 error 35 if rf, ok := ret.Get(0).(func(flow.RegisterID, uint64) ([]byte, error)); ok { 36 return rf(ID, height) 37 } 38 if rf, ok := ret.Get(0).(func(flow.RegisterID, uint64) []byte); ok { 39 r0 = rf(ID, height) 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).([]byte) 43 } 44 } 45 46 if rf, ok := ret.Get(1).(func(flow.RegisterID, uint64) error); ok { 47 r1 = rf(ID, height) 48 } else { 49 r1 = ret.Error(1) 50 } 51 52 return r0, r1 53 } 54 55 // LatestHeight provides a mock function with given fields: 56 func (_m *RegisterIndex) LatestHeight() uint64 { 57 ret := _m.Called() 58 59 var r0 uint64 60 if rf, ok := ret.Get(0).(func() uint64); ok { 61 r0 = rf() 62 } else { 63 r0 = ret.Get(0).(uint64) 64 } 65 66 return r0 67 } 68 69 // Store provides a mock function with given fields: entries, height 70 func (_m *RegisterIndex) Store(entries flow.RegisterEntries, height uint64) error { 71 ret := _m.Called(entries, height) 72 73 var r0 error 74 if rf, ok := ret.Get(0).(func(flow.RegisterEntries, uint64) error); ok { 75 r0 = rf(entries, height) 76 } else { 77 r0 = ret.Error(0) 78 } 79 80 return r0 81 } 82 83 type mockConstructorTestingTNewRegisterIndex interface { 84 mock.TestingT 85 Cleanup(func()) 86 } 87 88 // NewRegisterIndex creates a new instance of RegisterIndex. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 89 func NewRegisterIndex(t mockConstructorTestingTNewRegisterIndex) *RegisterIndex { 90 mock := &RegisterIndex{} 91 mock.Mock.Test(t) 92 93 t.Cleanup(func() { mock.AssertExpectations(t) }) 94 95 return mock 96 }