github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/protocol/mock/kv_store_reader.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 protocol "github.com/onflow/flow-go/state/protocol" 10 ) 11 12 // KVStoreReader is an autogenerated mock type for the KVStoreReader type 13 type KVStoreReader struct { 14 mock.Mock 15 } 16 17 // GetEpochStateID provides a mock function with given fields: 18 func (_m *KVStoreReader) GetEpochStateID() flow.Identifier { 19 ret := _m.Called() 20 21 var r0 flow.Identifier 22 if rf, ok := ret.Get(0).(func() flow.Identifier); ok { 23 r0 = rf() 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(flow.Identifier) 27 } 28 } 29 30 return r0 31 } 32 33 // GetProtocolStateVersion provides a mock function with given fields: 34 func (_m *KVStoreReader) GetProtocolStateVersion() uint64 { 35 ret := _m.Called() 36 37 var r0 uint64 38 if rf, ok := ret.Get(0).(func() uint64); ok { 39 r0 = rf() 40 } else { 41 r0 = ret.Get(0).(uint64) 42 } 43 44 return r0 45 } 46 47 // GetVersionUpgrade provides a mock function with given fields: 48 func (_m *KVStoreReader) GetVersionUpgrade() *protocol.ViewBasedActivator[uint64] { 49 ret := _m.Called() 50 51 var r0 *protocol.ViewBasedActivator[uint64] 52 if rf, ok := ret.Get(0).(func() *protocol.ViewBasedActivator[uint64]); ok { 53 r0 = rf() 54 } else { 55 if ret.Get(0) != nil { 56 r0 = ret.Get(0).(*protocol.ViewBasedActivator[uint64]) 57 } 58 } 59 60 return r0 61 } 62 63 // ID provides a mock function with given fields: 64 func (_m *KVStoreReader) ID() flow.Identifier { 65 ret := _m.Called() 66 67 var r0 flow.Identifier 68 if rf, ok := ret.Get(0).(func() flow.Identifier); ok { 69 r0 = rf() 70 } else { 71 if ret.Get(0) != nil { 72 r0 = ret.Get(0).(flow.Identifier) 73 } 74 } 75 76 return r0 77 } 78 79 // VersionedEncode provides a mock function with given fields: 80 func (_m *KVStoreReader) VersionedEncode() (uint64, []byte, error) { 81 ret := _m.Called() 82 83 var r0 uint64 84 var r1 []byte 85 var r2 error 86 if rf, ok := ret.Get(0).(func() (uint64, []byte, error)); ok { 87 return rf() 88 } 89 if rf, ok := ret.Get(0).(func() uint64); ok { 90 r0 = rf() 91 } else { 92 r0 = ret.Get(0).(uint64) 93 } 94 95 if rf, ok := ret.Get(1).(func() []byte); ok { 96 r1 = rf() 97 } else { 98 if ret.Get(1) != nil { 99 r1 = ret.Get(1).([]byte) 100 } 101 } 102 103 if rf, ok := ret.Get(2).(func() error); ok { 104 r2 = rf() 105 } else { 106 r2 = ret.Error(2) 107 } 108 109 return r0, r1, r2 110 } 111 112 type mockConstructorTestingTNewKVStoreReader interface { 113 mock.TestingT 114 Cleanup(func()) 115 } 116 117 // NewKVStoreReader creates a new instance of KVStoreReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 118 func NewKVStoreReader(t mockConstructorTestingTNewKVStoreReader) *KVStoreReader { 119 mock := &KVStoreReader{} 120 mock.Mock.Test(t) 121 122 t.Cleanup(func() { mock.AssertExpectations(t) }) 123 124 return mock 125 }