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