github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/mock/execution_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 transaction "github.com/onflow/flow-go/storage/badger/transaction" 12 ) 13 14 // ExecutionResults is an autogenerated mock type for the ExecutionResults type 15 type ExecutionResults struct { 16 mock.Mock 17 } 18 19 // BatchIndex provides a mock function with given fields: blockID, resultID, batch 20 func (_m *ExecutionResults) BatchIndex(blockID flow.Identifier, resultID flow.Identifier, batch storage.BatchStorage) error { 21 ret := _m.Called(blockID, resultID, batch) 22 23 var r0 error 24 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier, storage.BatchStorage) error); ok { 25 r0 = rf(blockID, resultID, batch) 26 } else { 27 r0 = ret.Error(0) 28 } 29 30 return r0 31 } 32 33 // BatchRemoveIndexByBlockID provides a mock function with given fields: blockID, batch 34 func (_m *ExecutionResults) BatchRemoveIndexByBlockID(blockID flow.Identifier, batch storage.BatchStorage) error { 35 ret := _m.Called(blockID, batch) 36 37 var r0 error 38 if rf, ok := ret.Get(0).(func(flow.Identifier, storage.BatchStorage) error); ok { 39 r0 = rf(blockID, batch) 40 } else { 41 r0 = ret.Error(0) 42 } 43 44 return r0 45 } 46 47 // BatchStore provides a mock function with given fields: result, batch 48 func (_m *ExecutionResults) BatchStore(result *flow.ExecutionResult, batch storage.BatchStorage) error { 49 ret := _m.Called(result, batch) 50 51 var r0 error 52 if rf, ok := ret.Get(0).(func(*flow.ExecutionResult, storage.BatchStorage) error); ok { 53 r0 = rf(result, batch) 54 } else { 55 r0 = ret.Error(0) 56 } 57 58 return r0 59 } 60 61 // ByBlockID provides a mock function with given fields: blockID 62 func (_m *ExecutionResults) ByBlockID(blockID flow.Identifier) (*flow.ExecutionResult, error) { 63 ret := _m.Called(blockID) 64 65 var r0 *flow.ExecutionResult 66 var r1 error 67 if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ExecutionResult, error)); ok { 68 return rf(blockID) 69 } 70 if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.ExecutionResult); ok { 71 r0 = rf(blockID) 72 } else { 73 if ret.Get(0) != nil { 74 r0 = ret.Get(0).(*flow.ExecutionResult) 75 } 76 } 77 78 if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { 79 r1 = rf(blockID) 80 } else { 81 r1 = ret.Error(1) 82 } 83 84 return r0, r1 85 } 86 87 // ByID provides a mock function with given fields: resultID 88 func (_m *ExecutionResults) ByID(resultID flow.Identifier) (*flow.ExecutionResult, error) { 89 ret := _m.Called(resultID) 90 91 var r0 *flow.ExecutionResult 92 var r1 error 93 if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.ExecutionResult, error)); ok { 94 return rf(resultID) 95 } 96 if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.ExecutionResult); ok { 97 r0 = rf(resultID) 98 } else { 99 if ret.Get(0) != nil { 100 r0 = ret.Get(0).(*flow.ExecutionResult) 101 } 102 } 103 104 if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { 105 r1 = rf(resultID) 106 } else { 107 r1 = ret.Error(1) 108 } 109 110 return r0, r1 111 } 112 113 // ByIDTx provides a mock function with given fields: resultID 114 func (_m *ExecutionResults) ByIDTx(resultID flow.Identifier) func(*transaction.Tx) (*flow.ExecutionResult, error) { 115 ret := _m.Called(resultID) 116 117 var r0 func(*transaction.Tx) (*flow.ExecutionResult, error) 118 if rf, ok := ret.Get(0).(func(flow.Identifier) func(*transaction.Tx) (*flow.ExecutionResult, error)); ok { 119 r0 = rf(resultID) 120 } else { 121 if ret.Get(0) != nil { 122 r0 = ret.Get(0).(func(*transaction.Tx) (*flow.ExecutionResult, error)) 123 } 124 } 125 126 return r0 127 } 128 129 // ForceIndex provides a mock function with given fields: blockID, resultID 130 func (_m *ExecutionResults) ForceIndex(blockID flow.Identifier, resultID flow.Identifier) error { 131 ret := _m.Called(blockID, resultID) 132 133 var r0 error 134 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { 135 r0 = rf(blockID, resultID) 136 } else { 137 r0 = ret.Error(0) 138 } 139 140 return r0 141 } 142 143 // Index provides a mock function with given fields: blockID, resultID 144 func (_m *ExecutionResults) Index(blockID flow.Identifier, resultID flow.Identifier) error { 145 ret := _m.Called(blockID, resultID) 146 147 var r0 error 148 if rf, ok := ret.Get(0).(func(flow.Identifier, flow.Identifier) error); ok { 149 r0 = rf(blockID, resultID) 150 } else { 151 r0 = ret.Error(0) 152 } 153 154 return r0 155 } 156 157 // Store provides a mock function with given fields: result 158 func (_m *ExecutionResults) Store(result *flow.ExecutionResult) error { 159 ret := _m.Called(result) 160 161 var r0 error 162 if rf, ok := ret.Get(0).(func(*flow.ExecutionResult) error); ok { 163 r0 = rf(result) 164 } else { 165 r0 = ret.Error(0) 166 } 167 168 return r0 169 } 170 171 type mockConstructorTestingTNewExecutionResults interface { 172 mock.TestingT 173 Cleanup(func()) 174 } 175 176 // NewExecutionResults creates a new instance of ExecutionResults. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 177 func NewExecutionResults(t mockConstructorTestingTNewExecutionResults) *ExecutionResults { 178 mock := &ExecutionResults{} 179 mock.Mock.Test(t) 180 181 t.Cleanup(func() { mock.AssertExpectations(t) }) 182 183 return mock 184 }