flamingo.me/flamingo-commerce/v3@v3.11.0/customer/domain/mocks/customer.go (about) 1 // Code generated by mockery v2.42.3. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 domain "flamingo.me/flamingo-commerce/v3/customer/domain" 7 mock "github.com/stretchr/testify/mock" 8 ) 9 10 // Customer is an autogenerated mock type for the Customer type 11 type Customer struct { 12 mock.Mock 13 } 14 15 type Customer_Expecter struct { 16 mock *mock.Mock 17 } 18 19 func (_m *Customer) EXPECT() *Customer_Expecter { 20 return &Customer_Expecter{mock: &_m.Mock} 21 } 22 23 // GetAddresses provides a mock function with given fields: 24 func (_m *Customer) GetAddresses() []domain.Address { 25 ret := _m.Called() 26 27 if len(ret) == 0 { 28 panic("no return value specified for GetAddresses") 29 } 30 31 var r0 []domain.Address 32 if rf, ok := ret.Get(0).(func() []domain.Address); ok { 33 r0 = rf() 34 } else { 35 if ret.Get(0) != nil { 36 r0 = ret.Get(0).([]domain.Address) 37 } 38 } 39 40 return r0 41 } 42 43 // Customer_GetAddresses_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAddresses' 44 type Customer_GetAddresses_Call struct { 45 *mock.Call 46 } 47 48 // GetAddresses is a helper method to define mock.On call 49 func (_e *Customer_Expecter) GetAddresses() *Customer_GetAddresses_Call { 50 return &Customer_GetAddresses_Call{Call: _e.mock.On("GetAddresses")} 51 } 52 53 func (_c *Customer_GetAddresses_Call) Run(run func()) *Customer_GetAddresses_Call { 54 _c.Call.Run(func(args mock.Arguments) { 55 run() 56 }) 57 return _c 58 } 59 60 func (_c *Customer_GetAddresses_Call) Return(_a0 []domain.Address) *Customer_GetAddresses_Call { 61 _c.Call.Return(_a0) 62 return _c 63 } 64 65 func (_c *Customer_GetAddresses_Call) RunAndReturn(run func() []domain.Address) *Customer_GetAddresses_Call { 66 _c.Call.Return(run) 67 return _c 68 } 69 70 // GetDefaultBillingAddress provides a mock function with given fields: 71 func (_m *Customer) GetDefaultBillingAddress() *domain.Address { 72 ret := _m.Called() 73 74 if len(ret) == 0 { 75 panic("no return value specified for GetDefaultBillingAddress") 76 } 77 78 var r0 *domain.Address 79 if rf, ok := ret.Get(0).(func() *domain.Address); ok { 80 r0 = rf() 81 } else { 82 if ret.Get(0) != nil { 83 r0 = ret.Get(0).(*domain.Address) 84 } 85 } 86 87 return r0 88 } 89 90 // Customer_GetDefaultBillingAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultBillingAddress' 91 type Customer_GetDefaultBillingAddress_Call struct { 92 *mock.Call 93 } 94 95 // GetDefaultBillingAddress is a helper method to define mock.On call 96 func (_e *Customer_Expecter) GetDefaultBillingAddress() *Customer_GetDefaultBillingAddress_Call { 97 return &Customer_GetDefaultBillingAddress_Call{Call: _e.mock.On("GetDefaultBillingAddress")} 98 } 99 100 func (_c *Customer_GetDefaultBillingAddress_Call) Run(run func()) *Customer_GetDefaultBillingAddress_Call { 101 _c.Call.Run(func(args mock.Arguments) { 102 run() 103 }) 104 return _c 105 } 106 107 func (_c *Customer_GetDefaultBillingAddress_Call) Return(_a0 *domain.Address) *Customer_GetDefaultBillingAddress_Call { 108 _c.Call.Return(_a0) 109 return _c 110 } 111 112 func (_c *Customer_GetDefaultBillingAddress_Call) RunAndReturn(run func() *domain.Address) *Customer_GetDefaultBillingAddress_Call { 113 _c.Call.Return(run) 114 return _c 115 } 116 117 // GetDefaultShippingAddress provides a mock function with given fields: 118 func (_m *Customer) GetDefaultShippingAddress() *domain.Address { 119 ret := _m.Called() 120 121 if len(ret) == 0 { 122 panic("no return value specified for GetDefaultShippingAddress") 123 } 124 125 var r0 *domain.Address 126 if rf, ok := ret.Get(0).(func() *domain.Address); ok { 127 r0 = rf() 128 } else { 129 if ret.Get(0) != nil { 130 r0 = ret.Get(0).(*domain.Address) 131 } 132 } 133 134 return r0 135 } 136 137 // Customer_GetDefaultShippingAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultShippingAddress' 138 type Customer_GetDefaultShippingAddress_Call struct { 139 *mock.Call 140 } 141 142 // GetDefaultShippingAddress is a helper method to define mock.On call 143 func (_e *Customer_Expecter) GetDefaultShippingAddress() *Customer_GetDefaultShippingAddress_Call { 144 return &Customer_GetDefaultShippingAddress_Call{Call: _e.mock.On("GetDefaultShippingAddress")} 145 } 146 147 func (_c *Customer_GetDefaultShippingAddress_Call) Run(run func()) *Customer_GetDefaultShippingAddress_Call { 148 _c.Call.Run(func(args mock.Arguments) { 149 run() 150 }) 151 return _c 152 } 153 154 func (_c *Customer_GetDefaultShippingAddress_Call) Return(_a0 *domain.Address) *Customer_GetDefaultShippingAddress_Call { 155 _c.Call.Return(_a0) 156 return _c 157 } 158 159 func (_c *Customer_GetDefaultShippingAddress_Call) RunAndReturn(run func() *domain.Address) *Customer_GetDefaultShippingAddress_Call { 160 _c.Call.Return(run) 161 return _c 162 } 163 164 // GetID provides a mock function with given fields: 165 func (_m *Customer) GetID() string { 166 ret := _m.Called() 167 168 if len(ret) == 0 { 169 panic("no return value specified for GetID") 170 } 171 172 var r0 string 173 if rf, ok := ret.Get(0).(func() string); ok { 174 r0 = rf() 175 } else { 176 r0 = ret.Get(0).(string) 177 } 178 179 return r0 180 } 181 182 // Customer_GetID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetID' 183 type Customer_GetID_Call struct { 184 *mock.Call 185 } 186 187 // GetID is a helper method to define mock.On call 188 func (_e *Customer_Expecter) GetID() *Customer_GetID_Call { 189 return &Customer_GetID_Call{Call: _e.mock.On("GetID")} 190 } 191 192 func (_c *Customer_GetID_Call) Run(run func()) *Customer_GetID_Call { 193 _c.Call.Run(func(args mock.Arguments) { 194 run() 195 }) 196 return _c 197 } 198 199 func (_c *Customer_GetID_Call) Return(_a0 string) *Customer_GetID_Call { 200 _c.Call.Return(_a0) 201 return _c 202 } 203 204 func (_c *Customer_GetID_Call) RunAndReturn(run func() string) *Customer_GetID_Call { 205 _c.Call.Return(run) 206 return _c 207 } 208 209 // GetPersonalData provides a mock function with given fields: 210 func (_m *Customer) GetPersonalData() domain.PersonData { 211 ret := _m.Called() 212 213 if len(ret) == 0 { 214 panic("no return value specified for GetPersonalData") 215 } 216 217 var r0 domain.PersonData 218 if rf, ok := ret.Get(0).(func() domain.PersonData); ok { 219 r0 = rf() 220 } else { 221 r0 = ret.Get(0).(domain.PersonData) 222 } 223 224 return r0 225 } 226 227 // Customer_GetPersonalData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPersonalData' 228 type Customer_GetPersonalData_Call struct { 229 *mock.Call 230 } 231 232 // GetPersonalData is a helper method to define mock.On call 233 func (_e *Customer_Expecter) GetPersonalData() *Customer_GetPersonalData_Call { 234 return &Customer_GetPersonalData_Call{Call: _e.mock.On("GetPersonalData")} 235 } 236 237 func (_c *Customer_GetPersonalData_Call) Run(run func()) *Customer_GetPersonalData_Call { 238 _c.Call.Run(func(args mock.Arguments) { 239 run() 240 }) 241 return _c 242 } 243 244 func (_c *Customer_GetPersonalData_Call) Return(_a0 domain.PersonData) *Customer_GetPersonalData_Call { 245 _c.Call.Return(_a0) 246 return _c 247 } 248 249 func (_c *Customer_GetPersonalData_Call) RunAndReturn(run func() domain.PersonData) *Customer_GetPersonalData_Call { 250 _c.Call.Return(run) 251 return _c 252 } 253 254 // NewCustomer creates a new instance of Customer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 255 // The first argument is typically a *testing.T value. 256 func NewCustomer(t interface { 257 mock.TestingT 258 Cleanup(func()) 259 }) *Customer { 260 mock := &Customer{} 261 mock.Mock.Test(t) 262 263 t.Cleanup(func() { mock.AssertExpectations(t) }) 264 265 return mock 266 }