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