github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/mock/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 // TransactionResults is an autogenerated mock type for the TransactionResults type 13 type TransactionResults struct { 14 mock.Mock 15 } 16 17 // BatchStore provides a mock function with given fields: blockID, transactionResults, batch 18 func (_m *TransactionResults) BatchStore(blockID flow.Identifier, transactionResults []flow.TransactionResult, 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.TransactionResult, 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 *TransactionResults) ByBlockID(id flow.Identifier) ([]flow.TransactionResult, error) { 33 ret := _m.Called(id) 34 35 var r0 []flow.TransactionResult 36 var r1 error 37 if rf, ok := ret.Get(0).(func(flow.Identifier) ([]flow.TransactionResult, error)); ok { 38 return rf(id) 39 } 40 if rf, ok := ret.Get(0).(func(flow.Identifier) []flow.TransactionResult); ok { 41 r0 = rf(id) 42 } else { 43 if ret.Get(0) != nil { 44 r0 = ret.Get(0).([]flow.TransactionResult) 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 *TransactionResults) ByBlockIDTransactionID(blockID flow.Identifier, transactionID flow.Identifier) (*flow.TransactionResult, error) { 59 ret := _m.Called(blockID, transactionID) 60 61 var r0 *flow.TransactionResult 62 var r1 error 63 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) (*flow.TransactionResult, error)); ok { 64 return rf(blockID, transactionID) 65 } 66 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) *flow.TransactionResult); ok { 67 r0 = rf(blockID, transactionID) 68 } else { 69 if ret.Get(0) != nil { 70 r0 = ret.Get(0).(*flow.TransactionResult) 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 *TransactionResults) ByBlockIDTransactionIndex(blockID flow.Identifier, txIndex uint32) (*flow.TransactionResult, error) { 85 ret := _m.Called(blockID, txIndex) 86 87 var r0 *flow.TransactionResult 88 var r1 error 89 if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) (*flow.TransactionResult, error)); ok { 90 return rf(blockID, txIndex) 91 } 92 if rf, ok := ret.Get(0).(func(flow.Identifier, uint32) *flow.TransactionResult); ok { 93 r0 = rf(blockID, txIndex) 94 } else { 95 if ret.Get(0) != nil { 96 r0 = ret.Get(0).(*flow.TransactionResult) 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 mockConstructorTestingTNewTransactionResults interface { 110 mock.TestingT 111 Cleanup(func()) 112 } 113 114 // NewTransactionResults creates a new instance of TransactionResults. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 115 func NewTransactionResults(t mockConstructorTestingTNewTransactionResults) *TransactionResults { 116 mock := &TransactionResults{} 117 mock.Mock.Test(t) 118 119 t.Cleanup(func() { mock.AssertExpectations(t) }) 120 121 return mock 122 }