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