github.com/koko1123/flow-go-1@v0.29.6/storage/mock/result_approvals.go (about) 1 // Code generated by mockery v2.13.1. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 flow "github.com/koko1123/flow-go-1/model/flow" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // ResultApprovals is an autogenerated mock type for the ResultApprovals type 11 type ResultApprovals struct { 12 mock.Mock 13 } 14 15 // ByChunk provides a mock function with given fields: resultID, chunkIndex 16 func (_m *ResultApprovals) ByChunk(resultID flow.Identifier, chunkIndex uint64) (*flow.ResultApproval, error) { 17 ret := _m.Called(resultID, chunkIndex) 18 19 var r0 *flow.ResultApproval 20 if rf, ok := ret.Get(0).(func(flow.Identifier, uint64) *flow.ResultApproval); ok { 21 r0 = rf(resultID, chunkIndex) 22 } else { 23 if ret.Get(0) != nil { 24 r0 = ret.Get(0).(*flow.ResultApproval) 25 } 26 } 27 28 var r1 error 29 if rf, ok := ret.Get(1).(func(flow.Identifier, uint64) error); ok { 30 r1 = rf(resultID, chunkIndex) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // ByID provides a mock function with given fields: approvalID 39 func (_m *ResultApprovals) ByID(approvalID flow.Identifier) (*flow.ResultApproval, error) { 40 ret := _m.Called(approvalID) 41 42 var r0 *flow.ResultApproval 43 if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.ResultApproval); ok { 44 r0 = rf(approvalID) 45 } else { 46 if ret.Get(0) != nil { 47 r0 = ret.Get(0).(*flow.ResultApproval) 48 } 49 } 50 51 var r1 error 52 if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { 53 r1 = rf(approvalID) 54 } else { 55 r1 = ret.Error(1) 56 } 57 58 return r0, r1 59 } 60 61 // Index provides a mock function with given fields: resultID, chunkIndex, approvalID 62 func (_m *ResultApprovals) Index(resultID flow.Identifier, chunkIndex uint64, approvalID flow.Identifier) error { 63 ret := _m.Called(resultID, chunkIndex, approvalID) 64 65 var r0 error 66 if rf, ok := ret.Get(0).(func(flow.Identifier, uint64, flow.Identifier) error); ok { 67 r0 = rf(resultID, chunkIndex, approvalID) 68 } else { 69 r0 = ret.Error(0) 70 } 71 72 return r0 73 } 74 75 // Store provides a mock function with given fields: result 76 func (_m *ResultApprovals) Store(result *flow.ResultApproval) error { 77 ret := _m.Called(result) 78 79 var r0 error 80 if rf, ok := ret.Get(0).(func(*flow.ResultApproval) error); ok { 81 r0 = rf(result) 82 } else { 83 r0 = ret.Error(0) 84 } 85 86 return r0 87 } 88 89 type mockConstructorTestingTNewResultApprovals interface { 90 mock.TestingT 91 Cleanup(func()) 92 } 93 94 // NewResultApprovals creates a new instance of ResultApprovals. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 95 func NewResultApprovals(t mockConstructorTestingTNewResultApprovals) *ResultApprovals { 96 mock := &ResultApprovals{} 97 mock.Mock.Test(t) 98 99 t.Cleanup(func() { mock.AssertExpectations(t) }) 100 101 return mock 102 }