github.com/koko1123/flow-go-1@v0.29.6/module/executiondatasync/execution_data/mock/execution_data_store.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 context "context" 7 8 flow "github.com/koko1123/flow-go-1/model/flow" 9 execution_data "github.com/koko1123/flow-go-1/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 // AddExecutionData provides a mock function with given fields: ctx, executionData 20 func (_m *ExecutionDataStore) AddExecutionData(ctx context.Context, executionData *execution_data.BlockExecutionData) (flow.Identifier, error) { 21 ret := _m.Called(ctx, executionData) 22 23 var r0 flow.Identifier 24 if rf, ok := ret.Get(0).(func(context.Context, *execution_data.BlockExecutionData) flow.Identifier); ok { 25 r0 = rf(ctx, executionData) 26 } else { 27 if ret.Get(0) != nil { 28 r0 = ret.Get(0).(flow.Identifier) 29 } 30 } 31 32 var r1 error 33 if rf, ok := ret.Get(1).(func(context.Context, *execution_data.BlockExecutionData) error); ok { 34 r1 = rf(ctx, executionData) 35 } else { 36 r1 = ret.Error(1) 37 } 38 39 return r0, r1 40 } 41 42 // GetExecutionData provides a mock function with given fields: ctx, rootID 43 func (_m *ExecutionDataStore) GetExecutionData(ctx context.Context, rootID flow.Identifier) (*execution_data.BlockExecutionData, error) { 44 ret := _m.Called(ctx, rootID) 45 46 var r0 *execution_data.BlockExecutionData 47 if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *execution_data.BlockExecutionData); ok { 48 r0 = rf(ctx, rootID) 49 } else { 50 if ret.Get(0) != nil { 51 r0 = ret.Get(0).(*execution_data.BlockExecutionData) 52 } 53 } 54 55 var r1 error 56 if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok { 57 r1 = rf(ctx, rootID) 58 } else { 59 r1 = ret.Error(1) 60 } 61 62 return r0, r1 63 } 64 65 type mockConstructorTestingTNewExecutionDataStore interface { 66 mock.TestingT 67 Cleanup(func()) 68 } 69 70 // 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. 71 func NewExecutionDataStore(t mockConstructorTestingTNewExecutionDataStore) *ExecutionDataStore { 72 mock := &ExecutionDataStore{} 73 mock.Mock.Test(t) 74 75 t.Cleanup(func() { mock.AssertExpectations(t) }) 76 77 return mock 78 }