flamingo.me/flamingo-commerce/v3@v3.11.0/cart/application/mocks/service.go (about) 1 // Code generated by mockery v2.42.3. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 application "flamingo.me/flamingo-commerce/v3/cart/application" 7 cart "flamingo.me/flamingo-commerce/v3/cart/domain/cart" 8 9 context "context" 10 11 decorator "flamingo.me/flamingo-commerce/v3/cart/domain/decorator" 12 13 domain "flamingo.me/flamingo-commerce/v3/product/domain" 14 15 mock "github.com/stretchr/testify/mock" 16 17 placeorder "flamingo.me/flamingo-commerce/v3/cart/domain/placeorder" 18 19 validation "flamingo.me/flamingo-commerce/v3/cart/domain/validation" 20 21 web "flamingo.me/flamingo/v3/framework/web" 22 ) 23 24 // CartService is an autogenerated mock type for the Service type 25 type CartService struct { 26 mock.Mock 27 } 28 29 type CartService_Expecter struct { 30 mock *mock.Mock 31 } 32 33 func (_m *CartService) EXPECT() *CartService_Expecter { 34 return &CartService_Expecter{mock: &_m.Mock} 35 } 36 37 // AddProduct provides a mock function with given fields: ctx, session, deliveryCode, addRequest 38 func (_m *CartService) AddProduct(ctx context.Context, session *web.Session, deliveryCode string, addRequest cart.AddRequest) (domain.BasicProduct, error) { 39 ret := _m.Called(ctx, session, deliveryCode, addRequest) 40 41 if len(ret) == 0 { 42 panic("no return value specified for AddProduct") 43 } 44 45 var r0 domain.BasicProduct 46 var r1 error 47 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, cart.AddRequest) (domain.BasicProduct, error)); ok { 48 return rf(ctx, session, deliveryCode, addRequest) 49 } 50 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, cart.AddRequest) domain.BasicProduct); ok { 51 r0 = rf(ctx, session, deliveryCode, addRequest) 52 } else { 53 if ret.Get(0) != nil { 54 r0 = ret.Get(0).(domain.BasicProduct) 55 } 56 } 57 58 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string, cart.AddRequest) error); ok { 59 r1 = rf(ctx, session, deliveryCode, addRequest) 60 } else { 61 r1 = ret.Error(1) 62 } 63 64 return r0, r1 65 } 66 67 // CartService_AddProduct_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddProduct' 68 type CartService_AddProduct_Call struct { 69 *mock.Call 70 } 71 72 // AddProduct is a helper method to define mock.On call 73 // - ctx context.Context 74 // - session *web.Session 75 // - deliveryCode string 76 // - addRequest cart.AddRequest 77 func (_e *CartService_Expecter) AddProduct(ctx interface{}, session interface{}, deliveryCode interface{}, addRequest interface{}) *CartService_AddProduct_Call { 78 return &CartService_AddProduct_Call{Call: _e.mock.On("AddProduct", ctx, session, deliveryCode, addRequest)} 79 } 80 81 func (_c *CartService_AddProduct_Call) Run(run func(ctx context.Context, session *web.Session, deliveryCode string, addRequest cart.AddRequest)) *CartService_AddProduct_Call { 82 _c.Call.Run(func(args mock.Arguments) { 83 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string), args[3].(cart.AddRequest)) 84 }) 85 return _c 86 } 87 88 func (_c *CartService_AddProduct_Call) Return(_a0 domain.BasicProduct, _a1 error) *CartService_AddProduct_Call { 89 _c.Call.Return(_a0, _a1) 90 return _c 91 } 92 93 func (_c *CartService_AddProduct_Call) RunAndReturn(run func(context.Context, *web.Session, string, cart.AddRequest) (domain.BasicProduct, error)) *CartService_AddProduct_Call { 94 _c.Call.Return(run) 95 return _c 96 } 97 98 // AdjustItemsToRestrictedQty provides a mock function with given fields: ctx, session 99 func (_m *CartService) AdjustItemsToRestrictedQty(ctx context.Context, session *web.Session) (application.QtyAdjustmentResults, error) { 100 ret := _m.Called(ctx, session) 101 102 if len(ret) == 0 { 103 panic("no return value specified for AdjustItemsToRestrictedQty") 104 } 105 106 var r0 application.QtyAdjustmentResults 107 var r1 error 108 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (application.QtyAdjustmentResults, error)); ok { 109 return rf(ctx, session) 110 } 111 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) application.QtyAdjustmentResults); ok { 112 r0 = rf(ctx, session) 113 } else { 114 if ret.Get(0) != nil { 115 r0 = ret.Get(0).(application.QtyAdjustmentResults) 116 } 117 } 118 119 if rf, ok := ret.Get(1).(func(context.Context, *web.Session) error); ok { 120 r1 = rf(ctx, session) 121 } else { 122 r1 = ret.Error(1) 123 } 124 125 return r0, r1 126 } 127 128 // CartService_AdjustItemsToRestrictedQty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AdjustItemsToRestrictedQty' 129 type CartService_AdjustItemsToRestrictedQty_Call struct { 130 *mock.Call 131 } 132 133 // AdjustItemsToRestrictedQty is a helper method to define mock.On call 134 // - ctx context.Context 135 // - session *web.Session 136 func (_e *CartService_Expecter) AdjustItemsToRestrictedQty(ctx interface{}, session interface{}) *CartService_AdjustItemsToRestrictedQty_Call { 137 return &CartService_AdjustItemsToRestrictedQty_Call{Call: _e.mock.On("AdjustItemsToRestrictedQty", ctx, session)} 138 } 139 140 func (_c *CartService_AdjustItemsToRestrictedQty_Call) Run(run func(ctx context.Context, session *web.Session)) *CartService_AdjustItemsToRestrictedQty_Call { 141 _c.Call.Run(func(args mock.Arguments) { 142 run(args[0].(context.Context), args[1].(*web.Session)) 143 }) 144 return _c 145 } 146 147 func (_c *CartService_AdjustItemsToRestrictedQty_Call) Return(_a0 application.QtyAdjustmentResults, _a1 error) *CartService_AdjustItemsToRestrictedQty_Call { 148 _c.Call.Return(_a0, _a1) 149 return _c 150 } 151 152 func (_c *CartService_AdjustItemsToRestrictedQty_Call) RunAndReturn(run func(context.Context, *web.Session) (application.QtyAdjustmentResults, error)) *CartService_AdjustItemsToRestrictedQty_Call { 153 _c.Call.Return(run) 154 return _c 155 } 156 157 // ApplyAny provides a mock function with given fields: ctx, session, anyCode 158 func (_m *CartService) ApplyAny(ctx context.Context, session *web.Session, anyCode string) (*cart.Cart, error) { 159 ret := _m.Called(ctx, session, anyCode) 160 161 if len(ret) == 0 { 162 panic("no return value specified for ApplyAny") 163 } 164 165 var r0 *cart.Cart 166 var r1 error 167 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { 168 return rf(ctx, session, anyCode) 169 } 170 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) *cart.Cart); ok { 171 r0 = rf(ctx, session, anyCode) 172 } else { 173 if ret.Get(0) != nil { 174 r0 = ret.Get(0).(*cart.Cart) 175 } 176 } 177 178 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string) error); ok { 179 r1 = rf(ctx, session, anyCode) 180 } else { 181 r1 = ret.Error(1) 182 } 183 184 return r0, r1 185 } 186 187 // CartService_ApplyAny_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyAny' 188 type CartService_ApplyAny_Call struct { 189 *mock.Call 190 } 191 192 // ApplyAny is a helper method to define mock.On call 193 // - ctx context.Context 194 // - session *web.Session 195 // - anyCode string 196 func (_e *CartService_Expecter) ApplyAny(ctx interface{}, session interface{}, anyCode interface{}) *CartService_ApplyAny_Call { 197 return &CartService_ApplyAny_Call{Call: _e.mock.On("ApplyAny", ctx, session, anyCode)} 198 } 199 200 func (_c *CartService_ApplyAny_Call) Run(run func(ctx context.Context, session *web.Session, anyCode string)) *CartService_ApplyAny_Call { 201 _c.Call.Run(func(args mock.Arguments) { 202 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string)) 203 }) 204 return _c 205 } 206 207 func (_c *CartService_ApplyAny_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_ApplyAny_Call { 208 _c.Call.Return(_a0, _a1) 209 return _c 210 } 211 212 func (_c *CartService_ApplyAny_Call) RunAndReturn(run func(context.Context, *web.Session, string) (*cart.Cart, error)) *CartService_ApplyAny_Call { 213 _c.Call.Return(run) 214 return _c 215 } 216 217 // ApplyGiftCard provides a mock function with given fields: ctx, session, couponCode 218 func (_m *CartService) ApplyGiftCard(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error) { 219 ret := _m.Called(ctx, session, couponCode) 220 221 if len(ret) == 0 { 222 panic("no return value specified for ApplyGiftCard") 223 } 224 225 var r0 *cart.Cart 226 var r1 error 227 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { 228 return rf(ctx, session, couponCode) 229 } 230 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) *cart.Cart); ok { 231 r0 = rf(ctx, session, couponCode) 232 } else { 233 if ret.Get(0) != nil { 234 r0 = ret.Get(0).(*cart.Cart) 235 } 236 } 237 238 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string) error); ok { 239 r1 = rf(ctx, session, couponCode) 240 } else { 241 r1 = ret.Error(1) 242 } 243 244 return r0, r1 245 } 246 247 // CartService_ApplyGiftCard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyGiftCard' 248 type CartService_ApplyGiftCard_Call struct { 249 *mock.Call 250 } 251 252 // ApplyGiftCard is a helper method to define mock.On call 253 // - ctx context.Context 254 // - session *web.Session 255 // - couponCode string 256 func (_e *CartService_Expecter) ApplyGiftCard(ctx interface{}, session interface{}, couponCode interface{}) *CartService_ApplyGiftCard_Call { 257 return &CartService_ApplyGiftCard_Call{Call: _e.mock.On("ApplyGiftCard", ctx, session, couponCode)} 258 } 259 260 func (_c *CartService_ApplyGiftCard_Call) Run(run func(ctx context.Context, session *web.Session, couponCode string)) *CartService_ApplyGiftCard_Call { 261 _c.Call.Run(func(args mock.Arguments) { 262 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string)) 263 }) 264 return _c 265 } 266 267 func (_c *CartService_ApplyGiftCard_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_ApplyGiftCard_Call { 268 _c.Call.Return(_a0, _a1) 269 return _c 270 } 271 272 func (_c *CartService_ApplyGiftCard_Call) RunAndReturn(run func(context.Context, *web.Session, string) (*cart.Cart, error)) *CartService_ApplyGiftCard_Call { 273 _c.Call.Return(run) 274 return _c 275 } 276 277 // ApplyVoucher provides a mock function with given fields: ctx, session, couponCode 278 func (_m *CartService) ApplyVoucher(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error) { 279 ret := _m.Called(ctx, session, couponCode) 280 281 if len(ret) == 0 { 282 panic("no return value specified for ApplyVoucher") 283 } 284 285 var r0 *cart.Cart 286 var r1 error 287 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { 288 return rf(ctx, session, couponCode) 289 } 290 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) *cart.Cart); ok { 291 r0 = rf(ctx, session, couponCode) 292 } else { 293 if ret.Get(0) != nil { 294 r0 = ret.Get(0).(*cart.Cart) 295 } 296 } 297 298 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string) error); ok { 299 r1 = rf(ctx, session, couponCode) 300 } else { 301 r1 = ret.Error(1) 302 } 303 304 return r0, r1 305 } 306 307 // CartService_ApplyVoucher_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ApplyVoucher' 308 type CartService_ApplyVoucher_Call struct { 309 *mock.Call 310 } 311 312 // ApplyVoucher is a helper method to define mock.On call 313 // - ctx context.Context 314 // - session *web.Session 315 // - couponCode string 316 func (_e *CartService_Expecter) ApplyVoucher(ctx interface{}, session interface{}, couponCode interface{}) *CartService_ApplyVoucher_Call { 317 return &CartService_ApplyVoucher_Call{Call: _e.mock.On("ApplyVoucher", ctx, session, couponCode)} 318 } 319 320 func (_c *CartService_ApplyVoucher_Call) Run(run func(ctx context.Context, session *web.Session, couponCode string)) *CartService_ApplyVoucher_Call { 321 _c.Call.Run(func(args mock.Arguments) { 322 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string)) 323 }) 324 return _c 325 } 326 327 func (_c *CartService_ApplyVoucher_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_ApplyVoucher_Call { 328 _c.Call.Return(_a0, _a1) 329 return _c 330 } 331 332 func (_c *CartService_ApplyVoucher_Call) RunAndReturn(run func(context.Context, *web.Session, string) (*cart.Cart, error)) *CartService_ApplyVoucher_Call { 333 _c.Call.Return(run) 334 return _c 335 } 336 337 // BuildAddRequest provides a mock function with given fields: ctx, marketplaceCode, variantMarketplaceCode, qty, additionalData 338 func (_m *CartService) BuildAddRequest(ctx context.Context, marketplaceCode string, variantMarketplaceCode string, qty int, additionalData map[string]string) cart.AddRequest { 339 ret := _m.Called(ctx, marketplaceCode, variantMarketplaceCode, qty, additionalData) 340 341 if len(ret) == 0 { 342 panic("no return value specified for BuildAddRequest") 343 } 344 345 var r0 cart.AddRequest 346 if rf, ok := ret.Get(0).(func(context.Context, string, string, int, map[string]string) cart.AddRequest); ok { 347 r0 = rf(ctx, marketplaceCode, variantMarketplaceCode, qty, additionalData) 348 } else { 349 r0 = ret.Get(0).(cart.AddRequest) 350 } 351 352 return r0 353 } 354 355 // CartService_BuildAddRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BuildAddRequest' 356 type CartService_BuildAddRequest_Call struct { 357 *mock.Call 358 } 359 360 // BuildAddRequest is a helper method to define mock.On call 361 // - ctx context.Context 362 // - marketplaceCode string 363 // - variantMarketplaceCode string 364 // - qty int 365 // - additionalData map[string]string 366 func (_e *CartService_Expecter) BuildAddRequest(ctx interface{}, marketplaceCode interface{}, variantMarketplaceCode interface{}, qty interface{}, additionalData interface{}) *CartService_BuildAddRequest_Call { 367 return &CartService_BuildAddRequest_Call{Call: _e.mock.On("BuildAddRequest", ctx, marketplaceCode, variantMarketplaceCode, qty, additionalData)} 368 } 369 370 func (_c *CartService_BuildAddRequest_Call) Run(run func(ctx context.Context, marketplaceCode string, variantMarketplaceCode string, qty int, additionalData map[string]string)) *CartService_BuildAddRequest_Call { 371 _c.Call.Run(func(args mock.Arguments) { 372 run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(int), args[4].(map[string]string)) 373 }) 374 return _c 375 } 376 377 func (_c *CartService_BuildAddRequest_Call) Return(_a0 cart.AddRequest) *CartService_BuildAddRequest_Call { 378 _c.Call.Return(_a0) 379 return _c 380 } 381 382 func (_c *CartService_BuildAddRequest_Call) RunAndReturn(run func(context.Context, string, string, int, map[string]string) cart.AddRequest) *CartService_BuildAddRequest_Call { 383 _c.Call.Return(run) 384 return _c 385 } 386 387 // CancelOrder provides a mock function with given fields: ctx, session, orderInfos, _a3 388 func (_m *CartService) CancelOrder(ctx context.Context, session *web.Session, orderInfos placeorder.PlacedOrderInfos, _a3 cart.Cart) (*cart.Cart, error) { 389 ret := _m.Called(ctx, session, orderInfos, _a3) 390 391 if len(ret) == 0 { 392 panic("no return value specified for CancelOrder") 393 } 394 395 var r0 *cart.Cart 396 var r1 error 397 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, placeorder.PlacedOrderInfos, cart.Cart) (*cart.Cart, error)); ok { 398 return rf(ctx, session, orderInfos, _a3) 399 } 400 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, placeorder.PlacedOrderInfos, cart.Cart) *cart.Cart); ok { 401 r0 = rf(ctx, session, orderInfos, _a3) 402 } else { 403 if ret.Get(0) != nil { 404 r0 = ret.Get(0).(*cart.Cart) 405 } 406 } 407 408 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, placeorder.PlacedOrderInfos, cart.Cart) error); ok { 409 r1 = rf(ctx, session, orderInfos, _a3) 410 } else { 411 r1 = ret.Error(1) 412 } 413 414 return r0, r1 415 } 416 417 // CartService_CancelOrder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelOrder' 418 type CartService_CancelOrder_Call struct { 419 *mock.Call 420 } 421 422 // CancelOrder is a helper method to define mock.On call 423 // - ctx context.Context 424 // - session *web.Session 425 // - orderInfos placeorder.PlacedOrderInfos 426 // - _a3 cart.Cart 427 func (_e *CartService_Expecter) CancelOrder(ctx interface{}, session interface{}, orderInfos interface{}, _a3 interface{}) *CartService_CancelOrder_Call { 428 return &CartService_CancelOrder_Call{Call: _e.mock.On("CancelOrder", ctx, session, orderInfos, _a3)} 429 } 430 431 func (_c *CartService_CancelOrder_Call) Run(run func(ctx context.Context, session *web.Session, orderInfos placeorder.PlacedOrderInfos, _a3 cart.Cart)) *CartService_CancelOrder_Call { 432 _c.Call.Run(func(args mock.Arguments) { 433 run(args[0].(context.Context), args[1].(*web.Session), args[2].(placeorder.PlacedOrderInfos), args[3].(cart.Cart)) 434 }) 435 return _c 436 } 437 438 func (_c *CartService_CancelOrder_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_CancelOrder_Call { 439 _c.Call.Return(_a0, _a1) 440 return _c 441 } 442 443 func (_c *CartService_CancelOrder_Call) RunAndReturn(run func(context.Context, *web.Session, placeorder.PlacedOrderInfos, cart.Cart) (*cart.Cart, error)) *CartService_CancelOrder_Call { 444 _c.Call.Return(run) 445 return _c 446 } 447 448 // CancelOrderWithoutRestore provides a mock function with given fields: ctx, session, orderInfos 449 func (_m *CartService) CancelOrderWithoutRestore(ctx context.Context, session *web.Session, orderInfos placeorder.PlacedOrderInfos) error { 450 ret := _m.Called(ctx, session, orderInfos) 451 452 if len(ret) == 0 { 453 panic("no return value specified for CancelOrderWithoutRestore") 454 } 455 456 var r0 error 457 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, placeorder.PlacedOrderInfos) error); ok { 458 r0 = rf(ctx, session, orderInfos) 459 } else { 460 r0 = ret.Error(0) 461 } 462 463 return r0 464 } 465 466 // CartService_CancelOrderWithoutRestore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CancelOrderWithoutRestore' 467 type CartService_CancelOrderWithoutRestore_Call struct { 468 *mock.Call 469 } 470 471 // CancelOrderWithoutRestore is a helper method to define mock.On call 472 // - ctx context.Context 473 // - session *web.Session 474 // - orderInfos placeorder.PlacedOrderInfos 475 func (_e *CartService_Expecter) CancelOrderWithoutRestore(ctx interface{}, session interface{}, orderInfos interface{}) *CartService_CancelOrderWithoutRestore_Call { 476 return &CartService_CancelOrderWithoutRestore_Call{Call: _e.mock.On("CancelOrderWithoutRestore", ctx, session, orderInfos)} 477 } 478 479 func (_c *CartService_CancelOrderWithoutRestore_Call) Run(run func(ctx context.Context, session *web.Session, orderInfos placeorder.PlacedOrderInfos)) *CartService_CancelOrderWithoutRestore_Call { 480 _c.Call.Run(func(args mock.Arguments) { 481 run(args[0].(context.Context), args[1].(*web.Session), args[2].(placeorder.PlacedOrderInfos)) 482 }) 483 return _c 484 } 485 486 func (_c *CartService_CancelOrderWithoutRestore_Call) Return(_a0 error) *CartService_CancelOrderWithoutRestore_Call { 487 _c.Call.Return(_a0) 488 return _c 489 } 490 491 func (_c *CartService_CancelOrderWithoutRestore_Call) RunAndReturn(run func(context.Context, *web.Session, placeorder.PlacedOrderInfos) error) *CartService_CancelOrderWithoutRestore_Call { 492 _c.Call.Return(run) 493 return _c 494 } 495 496 // Clean provides a mock function with given fields: ctx, session 497 func (_m *CartService) Clean(ctx context.Context, session *web.Session) error { 498 ret := _m.Called(ctx, session) 499 500 if len(ret) == 0 { 501 panic("no return value specified for Clean") 502 } 503 504 var r0 error 505 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) error); ok { 506 r0 = rf(ctx, session) 507 } else { 508 r0 = ret.Error(0) 509 } 510 511 return r0 512 } 513 514 // CartService_Clean_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clean' 515 type CartService_Clean_Call struct { 516 *mock.Call 517 } 518 519 // Clean is a helper method to define mock.On call 520 // - ctx context.Context 521 // - session *web.Session 522 func (_e *CartService_Expecter) Clean(ctx interface{}, session interface{}) *CartService_Clean_Call { 523 return &CartService_Clean_Call{Call: _e.mock.On("Clean", ctx, session)} 524 } 525 526 func (_c *CartService_Clean_Call) Run(run func(ctx context.Context, session *web.Session)) *CartService_Clean_Call { 527 _c.Call.Run(func(args mock.Arguments) { 528 run(args[0].(context.Context), args[1].(*web.Session)) 529 }) 530 return _c 531 } 532 533 func (_c *CartService_Clean_Call) Return(_a0 error) *CartService_Clean_Call { 534 _c.Call.Return(_a0) 535 return _c 536 } 537 538 func (_c *CartService_Clean_Call) RunAndReturn(run func(context.Context, *web.Session) error) *CartService_Clean_Call { 539 _c.Call.Return(run) 540 return _c 541 } 542 543 // CompleteCurrentCart provides a mock function with given fields: ctx 544 func (_m *CartService) CompleteCurrentCart(ctx context.Context) (*cart.Cart, error) { 545 ret := _m.Called(ctx) 546 547 if len(ret) == 0 { 548 panic("no return value specified for CompleteCurrentCart") 549 } 550 551 var r0 *cart.Cart 552 var r1 error 553 if rf, ok := ret.Get(0).(func(context.Context) (*cart.Cart, error)); ok { 554 return rf(ctx) 555 } 556 if rf, ok := ret.Get(0).(func(context.Context) *cart.Cart); ok { 557 r0 = rf(ctx) 558 } else { 559 if ret.Get(0) != nil { 560 r0 = ret.Get(0).(*cart.Cart) 561 } 562 } 563 564 if rf, ok := ret.Get(1).(func(context.Context) error); ok { 565 r1 = rf(ctx) 566 } else { 567 r1 = ret.Error(1) 568 } 569 570 return r0, r1 571 } 572 573 // CartService_CompleteCurrentCart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CompleteCurrentCart' 574 type CartService_CompleteCurrentCart_Call struct { 575 *mock.Call 576 } 577 578 // CompleteCurrentCart is a helper method to define mock.On call 579 // - ctx context.Context 580 func (_e *CartService_Expecter) CompleteCurrentCart(ctx interface{}) *CartService_CompleteCurrentCart_Call { 581 return &CartService_CompleteCurrentCart_Call{Call: _e.mock.On("CompleteCurrentCart", ctx)} 582 } 583 584 func (_c *CartService_CompleteCurrentCart_Call) Run(run func(ctx context.Context)) *CartService_CompleteCurrentCart_Call { 585 _c.Call.Run(func(args mock.Arguments) { 586 run(args[0].(context.Context)) 587 }) 588 return _c 589 } 590 591 func (_c *CartService_CompleteCurrentCart_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_CompleteCurrentCart_Call { 592 _c.Call.Return(_a0, _a1) 593 return _c 594 } 595 596 func (_c *CartService_CompleteCurrentCart_Call) RunAndReturn(run func(context.Context) (*cart.Cart, error)) *CartService_CompleteCurrentCart_Call { 597 _c.Call.Return(run) 598 return _c 599 } 600 601 // CreateInitialDeliveryIfNotPresent provides a mock function with given fields: ctx, session, deliveryCode 602 func (_m *CartService) CreateInitialDeliveryIfNotPresent(ctx context.Context, session *web.Session, deliveryCode string) (*cart.Cart, error) { 603 ret := _m.Called(ctx, session, deliveryCode) 604 605 if len(ret) == 0 { 606 panic("no return value specified for CreateInitialDeliveryIfNotPresent") 607 } 608 609 var r0 *cart.Cart 610 var r1 error 611 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { 612 return rf(ctx, session, deliveryCode) 613 } 614 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) *cart.Cart); ok { 615 r0 = rf(ctx, session, deliveryCode) 616 } else { 617 if ret.Get(0) != nil { 618 r0 = ret.Get(0).(*cart.Cart) 619 } 620 } 621 622 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string) error); ok { 623 r1 = rf(ctx, session, deliveryCode) 624 } else { 625 r1 = ret.Error(1) 626 } 627 628 return r0, r1 629 } 630 631 // CartService_CreateInitialDeliveryIfNotPresent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateInitialDeliveryIfNotPresent' 632 type CartService_CreateInitialDeliveryIfNotPresent_Call struct { 633 *mock.Call 634 } 635 636 // CreateInitialDeliveryIfNotPresent is a helper method to define mock.On call 637 // - ctx context.Context 638 // - session *web.Session 639 // - deliveryCode string 640 func (_e *CartService_Expecter) CreateInitialDeliveryIfNotPresent(ctx interface{}, session interface{}, deliveryCode interface{}) *CartService_CreateInitialDeliveryIfNotPresent_Call { 641 return &CartService_CreateInitialDeliveryIfNotPresent_Call{Call: _e.mock.On("CreateInitialDeliveryIfNotPresent", ctx, session, deliveryCode)} 642 } 643 644 func (_c *CartService_CreateInitialDeliveryIfNotPresent_Call) Run(run func(ctx context.Context, session *web.Session, deliveryCode string)) *CartService_CreateInitialDeliveryIfNotPresent_Call { 645 _c.Call.Run(func(args mock.Arguments) { 646 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string)) 647 }) 648 return _c 649 } 650 651 func (_c *CartService_CreateInitialDeliveryIfNotPresent_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_CreateInitialDeliveryIfNotPresent_Call { 652 _c.Call.Return(_a0, _a1) 653 return _c 654 } 655 656 func (_c *CartService_CreateInitialDeliveryIfNotPresent_Call) RunAndReturn(run func(context.Context, *web.Session, string) (*cart.Cart, error)) *CartService_CreateInitialDeliveryIfNotPresent_Call { 657 _c.Call.Return(run) 658 return _c 659 } 660 661 // DeleteAllItems provides a mock function with given fields: ctx, session 662 func (_m *CartService) DeleteAllItems(ctx context.Context, session *web.Session) error { 663 ret := _m.Called(ctx, session) 664 665 if len(ret) == 0 { 666 panic("no return value specified for DeleteAllItems") 667 } 668 669 var r0 error 670 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) error); ok { 671 r0 = rf(ctx, session) 672 } else { 673 r0 = ret.Error(0) 674 } 675 676 return r0 677 } 678 679 // CartService_DeleteAllItems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAllItems' 680 type CartService_DeleteAllItems_Call struct { 681 *mock.Call 682 } 683 684 // DeleteAllItems is a helper method to define mock.On call 685 // - ctx context.Context 686 // - session *web.Session 687 func (_e *CartService_Expecter) DeleteAllItems(ctx interface{}, session interface{}) *CartService_DeleteAllItems_Call { 688 return &CartService_DeleteAllItems_Call{Call: _e.mock.On("DeleteAllItems", ctx, session)} 689 } 690 691 func (_c *CartService_DeleteAllItems_Call) Run(run func(ctx context.Context, session *web.Session)) *CartService_DeleteAllItems_Call { 692 _c.Call.Run(func(args mock.Arguments) { 693 run(args[0].(context.Context), args[1].(*web.Session)) 694 }) 695 return _c 696 } 697 698 func (_c *CartService_DeleteAllItems_Call) Return(_a0 error) *CartService_DeleteAllItems_Call { 699 _c.Call.Return(_a0) 700 return _c 701 } 702 703 func (_c *CartService_DeleteAllItems_Call) RunAndReturn(run func(context.Context, *web.Session) error) *CartService_DeleteAllItems_Call { 704 _c.Call.Return(run) 705 return _c 706 } 707 708 // DeleteCartInCache provides a mock function with given fields: ctx, session, _a2 709 func (_m *CartService) DeleteCartInCache(ctx context.Context, session *web.Session, _a2 *cart.Cart) { 710 _m.Called(ctx, session, _a2) 711 } 712 713 // CartService_DeleteCartInCache_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteCartInCache' 714 type CartService_DeleteCartInCache_Call struct { 715 *mock.Call 716 } 717 718 // DeleteCartInCache is a helper method to define mock.On call 719 // - ctx context.Context 720 // - session *web.Session 721 // - _a2 *cart.Cart 722 func (_e *CartService_Expecter) DeleteCartInCache(ctx interface{}, session interface{}, _a2 interface{}) *CartService_DeleteCartInCache_Call { 723 return &CartService_DeleteCartInCache_Call{Call: _e.mock.On("DeleteCartInCache", ctx, session, _a2)} 724 } 725 726 func (_c *CartService_DeleteCartInCache_Call) Run(run func(ctx context.Context, session *web.Session, _a2 *cart.Cart)) *CartService_DeleteCartInCache_Call { 727 _c.Call.Run(func(args mock.Arguments) { 728 run(args[0].(context.Context), args[1].(*web.Session), args[2].(*cart.Cart)) 729 }) 730 return _c 731 } 732 733 func (_c *CartService_DeleteCartInCache_Call) Return() *CartService_DeleteCartInCache_Call { 734 _c.Call.Return() 735 return _c 736 } 737 738 func (_c *CartService_DeleteCartInCache_Call) RunAndReturn(run func(context.Context, *web.Session, *cart.Cart)) *CartService_DeleteCartInCache_Call { 739 _c.Call.Return(run) 740 return _c 741 } 742 743 // DeleteDelivery provides a mock function with given fields: ctx, session, deliveryCode 744 func (_m *CartService) DeleteDelivery(ctx context.Context, session *web.Session, deliveryCode string) (*cart.Cart, error) { 745 ret := _m.Called(ctx, session, deliveryCode) 746 747 if len(ret) == 0 { 748 panic("no return value specified for DeleteDelivery") 749 } 750 751 var r0 *cart.Cart 752 var r1 error 753 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { 754 return rf(ctx, session, deliveryCode) 755 } 756 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) *cart.Cart); ok { 757 r0 = rf(ctx, session, deliveryCode) 758 } else { 759 if ret.Get(0) != nil { 760 r0 = ret.Get(0).(*cart.Cart) 761 } 762 } 763 764 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string) error); ok { 765 r1 = rf(ctx, session, deliveryCode) 766 } else { 767 r1 = ret.Error(1) 768 } 769 770 return r0, r1 771 } 772 773 // CartService_DeleteDelivery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteDelivery' 774 type CartService_DeleteDelivery_Call struct { 775 *mock.Call 776 } 777 778 // DeleteDelivery is a helper method to define mock.On call 779 // - ctx context.Context 780 // - session *web.Session 781 // - deliveryCode string 782 func (_e *CartService_Expecter) DeleteDelivery(ctx interface{}, session interface{}, deliveryCode interface{}) *CartService_DeleteDelivery_Call { 783 return &CartService_DeleteDelivery_Call{Call: _e.mock.On("DeleteDelivery", ctx, session, deliveryCode)} 784 } 785 786 func (_c *CartService_DeleteDelivery_Call) Run(run func(ctx context.Context, session *web.Session, deliveryCode string)) *CartService_DeleteDelivery_Call { 787 _c.Call.Run(func(args mock.Arguments) { 788 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string)) 789 }) 790 return _c 791 } 792 793 func (_c *CartService_DeleteDelivery_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_DeleteDelivery_Call { 794 _c.Call.Return(_a0, _a1) 795 return _c 796 } 797 798 func (_c *CartService_DeleteDelivery_Call) RunAndReturn(run func(context.Context, *web.Session, string) (*cart.Cart, error)) *CartService_DeleteDelivery_Call { 799 _c.Call.Return(run) 800 return _c 801 } 802 803 // DeleteItem provides a mock function with given fields: ctx, session, itemID, deliveryCode 804 func (_m *CartService) DeleteItem(ctx context.Context, session *web.Session, itemID string, deliveryCode string) error { 805 ret := _m.Called(ctx, session, itemID, deliveryCode) 806 807 if len(ret) == 0 { 808 panic("no return value specified for DeleteItem") 809 } 810 811 var r0 error 812 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, string) error); ok { 813 r0 = rf(ctx, session, itemID, deliveryCode) 814 } else { 815 r0 = ret.Error(0) 816 } 817 818 return r0 819 } 820 821 // CartService_DeleteItem_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteItem' 822 type CartService_DeleteItem_Call struct { 823 *mock.Call 824 } 825 826 // DeleteItem is a helper method to define mock.On call 827 // - ctx context.Context 828 // - session *web.Session 829 // - itemID string 830 // - deliveryCode string 831 func (_e *CartService_Expecter) DeleteItem(ctx interface{}, session interface{}, itemID interface{}, deliveryCode interface{}) *CartService_DeleteItem_Call { 832 return &CartService_DeleteItem_Call{Call: _e.mock.On("DeleteItem", ctx, session, itemID, deliveryCode)} 833 } 834 835 func (_c *CartService_DeleteItem_Call) Run(run func(ctx context.Context, session *web.Session, itemID string, deliveryCode string)) *CartService_DeleteItem_Call { 836 _c.Call.Run(func(args mock.Arguments) { 837 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string), args[3].(string)) 838 }) 839 return _c 840 } 841 842 func (_c *CartService_DeleteItem_Call) Return(_a0 error) *CartService_DeleteItem_Call { 843 _c.Call.Return(_a0) 844 return _c 845 } 846 847 func (_c *CartService_DeleteItem_Call) RunAndReturn(run func(context.Context, *web.Session, string, string) error) *CartService_DeleteItem_Call { 848 _c.Call.Return(run) 849 return _c 850 } 851 852 // ForceReserveOrderIDAndSave provides a mock function with given fields: ctx, session 853 func (_m *CartService) ForceReserveOrderIDAndSave(ctx context.Context, session *web.Session) (*cart.Cart, error) { 854 ret := _m.Called(ctx, session) 855 856 if len(ret) == 0 { 857 panic("no return value specified for ForceReserveOrderIDAndSave") 858 } 859 860 var r0 *cart.Cart 861 var r1 error 862 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (*cart.Cart, error)); ok { 863 return rf(ctx, session) 864 } 865 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) *cart.Cart); ok { 866 r0 = rf(ctx, session) 867 } else { 868 if ret.Get(0) != nil { 869 r0 = ret.Get(0).(*cart.Cart) 870 } 871 } 872 873 if rf, ok := ret.Get(1).(func(context.Context, *web.Session) error); ok { 874 r1 = rf(ctx, session) 875 } else { 876 r1 = ret.Error(1) 877 } 878 879 return r0, r1 880 } 881 882 // CartService_ForceReserveOrderIDAndSave_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ForceReserveOrderIDAndSave' 883 type CartService_ForceReserveOrderIDAndSave_Call struct { 884 *mock.Call 885 } 886 887 // ForceReserveOrderIDAndSave is a helper method to define mock.On call 888 // - ctx context.Context 889 // - session *web.Session 890 func (_e *CartService_Expecter) ForceReserveOrderIDAndSave(ctx interface{}, session interface{}) *CartService_ForceReserveOrderIDAndSave_Call { 891 return &CartService_ForceReserveOrderIDAndSave_Call{Call: _e.mock.On("ForceReserveOrderIDAndSave", ctx, session)} 892 } 893 894 func (_c *CartService_ForceReserveOrderIDAndSave_Call) Run(run func(ctx context.Context, session *web.Session)) *CartService_ForceReserveOrderIDAndSave_Call { 895 _c.Call.Run(func(args mock.Arguments) { 896 run(args[0].(context.Context), args[1].(*web.Session)) 897 }) 898 return _c 899 } 900 901 func (_c *CartService_ForceReserveOrderIDAndSave_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_ForceReserveOrderIDAndSave_Call { 902 _c.Call.Return(_a0, _a1) 903 return _c 904 } 905 906 func (_c *CartService_ForceReserveOrderIDAndSave_Call) RunAndReturn(run func(context.Context, *web.Session) (*cart.Cart, error)) *CartService_ForceReserveOrderIDAndSave_Call { 907 _c.Call.Return(run) 908 return _c 909 } 910 911 // GetCartReceiverService provides a mock function with given fields: 912 func (_m *CartService) GetCartReceiverService() *application.CartReceiverService { 913 ret := _m.Called() 914 915 if len(ret) == 0 { 916 panic("no return value specified for GetCartReceiverService") 917 } 918 919 var r0 *application.CartReceiverService 920 if rf, ok := ret.Get(0).(func() *application.CartReceiverService); ok { 921 r0 = rf() 922 } else { 923 if ret.Get(0) != nil { 924 r0 = ret.Get(0).(*application.CartReceiverService) 925 } 926 } 927 928 return r0 929 } 930 931 // CartService_GetCartReceiverService_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCartReceiverService' 932 type CartService_GetCartReceiverService_Call struct { 933 *mock.Call 934 } 935 936 // GetCartReceiverService is a helper method to define mock.On call 937 func (_e *CartService_Expecter) GetCartReceiverService() *CartService_GetCartReceiverService_Call { 938 return &CartService_GetCartReceiverService_Call{Call: _e.mock.On("GetCartReceiverService")} 939 } 940 941 func (_c *CartService_GetCartReceiverService_Call) Run(run func()) *CartService_GetCartReceiverService_Call { 942 _c.Call.Run(func(args mock.Arguments) { 943 run() 944 }) 945 return _c 946 } 947 948 func (_c *CartService_GetCartReceiverService_Call) Return(_a0 *application.CartReceiverService) *CartService_GetCartReceiverService_Call { 949 _c.Call.Return(_a0) 950 return _c 951 } 952 953 func (_c *CartService_GetCartReceiverService_Call) RunAndReturn(run func() *application.CartReceiverService) *CartService_GetCartReceiverService_Call { 954 _c.Call.Return(run) 955 return _c 956 } 957 958 // GetDefaultDeliveryCode provides a mock function with given fields: 959 func (_m *CartService) GetDefaultDeliveryCode() string { 960 ret := _m.Called() 961 962 if len(ret) == 0 { 963 panic("no return value specified for GetDefaultDeliveryCode") 964 } 965 966 var r0 string 967 if rf, ok := ret.Get(0).(func() string); ok { 968 r0 = rf() 969 } else { 970 r0 = ret.Get(0).(string) 971 } 972 973 return r0 974 } 975 976 // CartService_GetDefaultDeliveryCode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDefaultDeliveryCode' 977 type CartService_GetDefaultDeliveryCode_Call struct { 978 *mock.Call 979 } 980 981 // GetDefaultDeliveryCode is a helper method to define mock.On call 982 func (_e *CartService_Expecter) GetDefaultDeliveryCode() *CartService_GetDefaultDeliveryCode_Call { 983 return &CartService_GetDefaultDeliveryCode_Call{Call: _e.mock.On("GetDefaultDeliveryCode")} 984 } 985 986 func (_c *CartService_GetDefaultDeliveryCode_Call) Run(run func()) *CartService_GetDefaultDeliveryCode_Call { 987 _c.Call.Run(func(args mock.Arguments) { 988 run() 989 }) 990 return _c 991 } 992 993 func (_c *CartService_GetDefaultDeliveryCode_Call) Return(_a0 string) *CartService_GetDefaultDeliveryCode_Call { 994 _c.Call.Return(_a0) 995 return _c 996 } 997 998 func (_c *CartService_GetDefaultDeliveryCode_Call) RunAndReturn(run func() string) *CartService_GetDefaultDeliveryCode_Call { 999 _c.Call.Return(run) 1000 return _c 1001 } 1002 1003 // GetInitialDelivery provides a mock function with given fields: deliveryCode 1004 func (_m *CartService) GetInitialDelivery(deliveryCode string) (*cart.DeliveryInfo, error) { 1005 ret := _m.Called(deliveryCode) 1006 1007 if len(ret) == 0 { 1008 panic("no return value specified for GetInitialDelivery") 1009 } 1010 1011 var r0 *cart.DeliveryInfo 1012 var r1 error 1013 if rf, ok := ret.Get(0).(func(string) (*cart.DeliveryInfo, error)); ok { 1014 return rf(deliveryCode) 1015 } 1016 if rf, ok := ret.Get(0).(func(string) *cart.DeliveryInfo); ok { 1017 r0 = rf(deliveryCode) 1018 } else { 1019 if ret.Get(0) != nil { 1020 r0 = ret.Get(0).(*cart.DeliveryInfo) 1021 } 1022 } 1023 1024 if rf, ok := ret.Get(1).(func(string) error); ok { 1025 r1 = rf(deliveryCode) 1026 } else { 1027 r1 = ret.Error(1) 1028 } 1029 1030 return r0, r1 1031 } 1032 1033 // CartService_GetInitialDelivery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetInitialDelivery' 1034 type CartService_GetInitialDelivery_Call struct { 1035 *mock.Call 1036 } 1037 1038 // GetInitialDelivery is a helper method to define mock.On call 1039 // - deliveryCode string 1040 func (_e *CartService_Expecter) GetInitialDelivery(deliveryCode interface{}) *CartService_GetInitialDelivery_Call { 1041 return &CartService_GetInitialDelivery_Call{Call: _e.mock.On("GetInitialDelivery", deliveryCode)} 1042 } 1043 1044 func (_c *CartService_GetInitialDelivery_Call) Run(run func(deliveryCode string)) *CartService_GetInitialDelivery_Call { 1045 _c.Call.Run(func(args mock.Arguments) { 1046 run(args[0].(string)) 1047 }) 1048 return _c 1049 } 1050 1051 func (_c *CartService_GetInitialDelivery_Call) Return(_a0 *cart.DeliveryInfo, _a1 error) *CartService_GetInitialDelivery_Call { 1052 _c.Call.Return(_a0, _a1) 1053 return _c 1054 } 1055 1056 func (_c *CartService_GetInitialDelivery_Call) RunAndReturn(run func(string) (*cart.DeliveryInfo, error)) *CartService_GetInitialDelivery_Call { 1057 _c.Call.Return(run) 1058 return _c 1059 } 1060 1061 // PlaceOrder provides a mock function with given fields: ctx, session, payment 1062 func (_m *CartService) PlaceOrder(ctx context.Context, session *web.Session, payment *placeorder.Payment) (placeorder.PlacedOrderInfos, error) { 1063 ret := _m.Called(ctx, session, payment) 1064 1065 if len(ret) == 0 { 1066 panic("no return value specified for PlaceOrder") 1067 } 1068 1069 var r0 placeorder.PlacedOrderInfos 1070 var r1 error 1071 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *placeorder.Payment) (placeorder.PlacedOrderInfos, error)); ok { 1072 return rf(ctx, session, payment) 1073 } 1074 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *placeorder.Payment) placeorder.PlacedOrderInfos); ok { 1075 r0 = rf(ctx, session, payment) 1076 } else { 1077 if ret.Get(0) != nil { 1078 r0 = ret.Get(0).(placeorder.PlacedOrderInfos) 1079 } 1080 } 1081 1082 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, *placeorder.Payment) error); ok { 1083 r1 = rf(ctx, session, payment) 1084 } else { 1085 r1 = ret.Error(1) 1086 } 1087 1088 return r0, r1 1089 } 1090 1091 // CartService_PlaceOrder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PlaceOrder' 1092 type CartService_PlaceOrder_Call struct { 1093 *mock.Call 1094 } 1095 1096 // PlaceOrder is a helper method to define mock.On call 1097 // - ctx context.Context 1098 // - session *web.Session 1099 // - payment *placeorder.Payment 1100 func (_e *CartService_Expecter) PlaceOrder(ctx interface{}, session interface{}, payment interface{}) *CartService_PlaceOrder_Call { 1101 return &CartService_PlaceOrder_Call{Call: _e.mock.On("PlaceOrder", ctx, session, payment)} 1102 } 1103 1104 func (_c *CartService_PlaceOrder_Call) Run(run func(ctx context.Context, session *web.Session, payment *placeorder.Payment)) *CartService_PlaceOrder_Call { 1105 _c.Call.Run(func(args mock.Arguments) { 1106 run(args[0].(context.Context), args[1].(*web.Session), args[2].(*placeorder.Payment)) 1107 }) 1108 return _c 1109 } 1110 1111 func (_c *CartService_PlaceOrder_Call) Return(_a0 placeorder.PlacedOrderInfos, _a1 error) *CartService_PlaceOrder_Call { 1112 _c.Call.Return(_a0, _a1) 1113 return _c 1114 } 1115 1116 func (_c *CartService_PlaceOrder_Call) RunAndReturn(run func(context.Context, *web.Session, *placeorder.Payment) (placeorder.PlacedOrderInfos, error)) *CartService_PlaceOrder_Call { 1117 _c.Call.Return(run) 1118 return _c 1119 } 1120 1121 // PlaceOrderWithCart provides a mock function with given fields: ctx, session, _a2, payment 1122 func (_m *CartService) PlaceOrderWithCart(ctx context.Context, session *web.Session, _a2 *cart.Cart, payment *placeorder.Payment) (placeorder.PlacedOrderInfos, error) { 1123 ret := _m.Called(ctx, session, _a2, payment) 1124 1125 if len(ret) == 0 { 1126 panic("no return value specified for PlaceOrderWithCart") 1127 } 1128 1129 var r0 placeorder.PlacedOrderInfos 1130 var r1 error 1131 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *cart.Cart, *placeorder.Payment) (placeorder.PlacedOrderInfos, error)); ok { 1132 return rf(ctx, session, _a2, payment) 1133 } 1134 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *cart.Cart, *placeorder.Payment) placeorder.PlacedOrderInfos); ok { 1135 r0 = rf(ctx, session, _a2, payment) 1136 } else { 1137 if ret.Get(0) != nil { 1138 r0 = ret.Get(0).(placeorder.PlacedOrderInfos) 1139 } 1140 } 1141 1142 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, *cart.Cart, *placeorder.Payment) error); ok { 1143 r1 = rf(ctx, session, _a2, payment) 1144 } else { 1145 r1 = ret.Error(1) 1146 } 1147 1148 return r0, r1 1149 } 1150 1151 // CartService_PlaceOrderWithCart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PlaceOrderWithCart' 1152 type CartService_PlaceOrderWithCart_Call struct { 1153 *mock.Call 1154 } 1155 1156 // PlaceOrderWithCart is a helper method to define mock.On call 1157 // - ctx context.Context 1158 // - session *web.Session 1159 // - _a2 *cart.Cart 1160 // - payment *placeorder.Payment 1161 func (_e *CartService_Expecter) PlaceOrderWithCart(ctx interface{}, session interface{}, _a2 interface{}, payment interface{}) *CartService_PlaceOrderWithCart_Call { 1162 return &CartService_PlaceOrderWithCart_Call{Call: _e.mock.On("PlaceOrderWithCart", ctx, session, _a2, payment)} 1163 } 1164 1165 func (_c *CartService_PlaceOrderWithCart_Call) Run(run func(ctx context.Context, session *web.Session, _a2 *cart.Cart, payment *placeorder.Payment)) *CartService_PlaceOrderWithCart_Call { 1166 _c.Call.Run(func(args mock.Arguments) { 1167 run(args[0].(context.Context), args[1].(*web.Session), args[2].(*cart.Cart), args[3].(*placeorder.Payment)) 1168 }) 1169 return _c 1170 } 1171 1172 func (_c *CartService_PlaceOrderWithCart_Call) Return(_a0 placeorder.PlacedOrderInfos, _a1 error) *CartService_PlaceOrderWithCart_Call { 1173 _c.Call.Return(_a0, _a1) 1174 return _c 1175 } 1176 1177 func (_c *CartService_PlaceOrderWithCart_Call) RunAndReturn(run func(context.Context, *web.Session, *cart.Cart, *placeorder.Payment) (placeorder.PlacedOrderInfos, error)) *CartService_PlaceOrderWithCart_Call { 1178 _c.Call.Return(run) 1179 return _c 1180 } 1181 1182 // RemoveGiftCard provides a mock function with given fields: ctx, session, couponCode 1183 func (_m *CartService) RemoveGiftCard(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error) { 1184 ret := _m.Called(ctx, session, couponCode) 1185 1186 if len(ret) == 0 { 1187 panic("no return value specified for RemoveGiftCard") 1188 } 1189 1190 var r0 *cart.Cart 1191 var r1 error 1192 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { 1193 return rf(ctx, session, couponCode) 1194 } 1195 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) *cart.Cart); ok { 1196 r0 = rf(ctx, session, couponCode) 1197 } else { 1198 if ret.Get(0) != nil { 1199 r0 = ret.Get(0).(*cart.Cart) 1200 } 1201 } 1202 1203 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string) error); ok { 1204 r1 = rf(ctx, session, couponCode) 1205 } else { 1206 r1 = ret.Error(1) 1207 } 1208 1209 return r0, r1 1210 } 1211 1212 // CartService_RemoveGiftCard_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveGiftCard' 1213 type CartService_RemoveGiftCard_Call struct { 1214 *mock.Call 1215 } 1216 1217 // RemoveGiftCard is a helper method to define mock.On call 1218 // - ctx context.Context 1219 // - session *web.Session 1220 // - couponCode string 1221 func (_e *CartService_Expecter) RemoveGiftCard(ctx interface{}, session interface{}, couponCode interface{}) *CartService_RemoveGiftCard_Call { 1222 return &CartService_RemoveGiftCard_Call{Call: _e.mock.On("RemoveGiftCard", ctx, session, couponCode)} 1223 } 1224 1225 func (_c *CartService_RemoveGiftCard_Call) Run(run func(ctx context.Context, session *web.Session, couponCode string)) *CartService_RemoveGiftCard_Call { 1226 _c.Call.Run(func(args mock.Arguments) { 1227 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string)) 1228 }) 1229 return _c 1230 } 1231 1232 func (_c *CartService_RemoveGiftCard_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_RemoveGiftCard_Call { 1233 _c.Call.Return(_a0, _a1) 1234 return _c 1235 } 1236 1237 func (_c *CartService_RemoveGiftCard_Call) RunAndReturn(run func(context.Context, *web.Session, string) (*cart.Cart, error)) *CartService_RemoveGiftCard_Call { 1238 _c.Call.Return(run) 1239 return _c 1240 } 1241 1242 // RemoveVoucher provides a mock function with given fields: ctx, session, couponCode 1243 func (_m *CartService) RemoveVoucher(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error) { 1244 ret := _m.Called(ctx, session, couponCode) 1245 1246 if len(ret) == 0 { 1247 panic("no return value specified for RemoveVoucher") 1248 } 1249 1250 var r0 *cart.Cart 1251 var r1 error 1252 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { 1253 return rf(ctx, session, couponCode) 1254 } 1255 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) *cart.Cart); ok { 1256 r0 = rf(ctx, session, couponCode) 1257 } else { 1258 if ret.Get(0) != nil { 1259 r0 = ret.Get(0).(*cart.Cart) 1260 } 1261 } 1262 1263 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string) error); ok { 1264 r1 = rf(ctx, session, couponCode) 1265 } else { 1266 r1 = ret.Error(1) 1267 } 1268 1269 return r0, r1 1270 } 1271 1272 // CartService_RemoveVoucher_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveVoucher' 1273 type CartService_RemoveVoucher_Call struct { 1274 *mock.Call 1275 } 1276 1277 // RemoveVoucher is a helper method to define mock.On call 1278 // - ctx context.Context 1279 // - session *web.Session 1280 // - couponCode string 1281 func (_e *CartService_Expecter) RemoveVoucher(ctx interface{}, session interface{}, couponCode interface{}) *CartService_RemoveVoucher_Call { 1282 return &CartService_RemoveVoucher_Call{Call: _e.mock.On("RemoveVoucher", ctx, session, couponCode)} 1283 } 1284 1285 func (_c *CartService_RemoveVoucher_Call) Run(run func(ctx context.Context, session *web.Session, couponCode string)) *CartService_RemoveVoucher_Call { 1286 _c.Call.Run(func(args mock.Arguments) { 1287 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string)) 1288 }) 1289 return _c 1290 } 1291 1292 func (_c *CartService_RemoveVoucher_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_RemoveVoucher_Call { 1293 _c.Call.Return(_a0, _a1) 1294 return _c 1295 } 1296 1297 func (_c *CartService_RemoveVoucher_Call) RunAndReturn(run func(context.Context, *web.Session, string) (*cart.Cart, error)) *CartService_RemoveVoucher_Call { 1298 _c.Call.Return(run) 1299 return _c 1300 } 1301 1302 // ReserveOrderIDAndSave provides a mock function with given fields: ctx, session 1303 func (_m *CartService) ReserveOrderIDAndSave(ctx context.Context, session *web.Session) (*cart.Cart, error) { 1304 ret := _m.Called(ctx, session) 1305 1306 if len(ret) == 0 { 1307 panic("no return value specified for ReserveOrderIDAndSave") 1308 } 1309 1310 var r0 *cart.Cart 1311 var r1 error 1312 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (*cart.Cart, error)); ok { 1313 return rf(ctx, session) 1314 } 1315 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) *cart.Cart); ok { 1316 r0 = rf(ctx, session) 1317 } else { 1318 if ret.Get(0) != nil { 1319 r0 = ret.Get(0).(*cart.Cart) 1320 } 1321 } 1322 1323 if rf, ok := ret.Get(1).(func(context.Context, *web.Session) error); ok { 1324 r1 = rf(ctx, session) 1325 } else { 1326 r1 = ret.Error(1) 1327 } 1328 1329 return r0, r1 1330 } 1331 1332 // CartService_ReserveOrderIDAndSave_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReserveOrderIDAndSave' 1333 type CartService_ReserveOrderIDAndSave_Call struct { 1334 *mock.Call 1335 } 1336 1337 // ReserveOrderIDAndSave is a helper method to define mock.On call 1338 // - ctx context.Context 1339 // - session *web.Session 1340 func (_e *CartService_Expecter) ReserveOrderIDAndSave(ctx interface{}, session interface{}) *CartService_ReserveOrderIDAndSave_Call { 1341 return &CartService_ReserveOrderIDAndSave_Call{Call: _e.mock.On("ReserveOrderIDAndSave", ctx, session)} 1342 } 1343 1344 func (_c *CartService_ReserveOrderIDAndSave_Call) Run(run func(ctx context.Context, session *web.Session)) *CartService_ReserveOrderIDAndSave_Call { 1345 _c.Call.Run(func(args mock.Arguments) { 1346 run(args[0].(context.Context), args[1].(*web.Session)) 1347 }) 1348 return _c 1349 } 1350 1351 func (_c *CartService_ReserveOrderIDAndSave_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_ReserveOrderIDAndSave_Call { 1352 _c.Call.Return(_a0, _a1) 1353 return _c 1354 } 1355 1356 func (_c *CartService_ReserveOrderIDAndSave_Call) RunAndReturn(run func(context.Context, *web.Session) (*cart.Cart, error)) *CartService_ReserveOrderIDAndSave_Call { 1357 _c.Call.Return(run) 1358 return _c 1359 } 1360 1361 // RestoreCart provides a mock function with given fields: ctx, _a1 1362 func (_m *CartService) RestoreCart(ctx context.Context, _a1 *cart.Cart) (*cart.Cart, error) { 1363 ret := _m.Called(ctx, _a1) 1364 1365 if len(ret) == 0 { 1366 panic("no return value specified for RestoreCart") 1367 } 1368 1369 var r0 *cart.Cart 1370 var r1 error 1371 if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart) (*cart.Cart, error)); ok { 1372 return rf(ctx, _a1) 1373 } 1374 if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart) *cart.Cart); ok { 1375 r0 = rf(ctx, _a1) 1376 } else { 1377 if ret.Get(0) != nil { 1378 r0 = ret.Get(0).(*cart.Cart) 1379 } 1380 } 1381 1382 if rf, ok := ret.Get(1).(func(context.Context, *cart.Cart) error); ok { 1383 r1 = rf(ctx, _a1) 1384 } else { 1385 r1 = ret.Error(1) 1386 } 1387 1388 return r0, r1 1389 } 1390 1391 // CartService_RestoreCart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreCart' 1392 type CartService_RestoreCart_Call struct { 1393 *mock.Call 1394 } 1395 1396 // RestoreCart is a helper method to define mock.On call 1397 // - ctx context.Context 1398 // - _a1 *cart.Cart 1399 func (_e *CartService_Expecter) RestoreCart(ctx interface{}, _a1 interface{}) *CartService_RestoreCart_Call { 1400 return &CartService_RestoreCart_Call{Call: _e.mock.On("RestoreCart", ctx, _a1)} 1401 } 1402 1403 func (_c *CartService_RestoreCart_Call) Run(run func(ctx context.Context, _a1 *cart.Cart)) *CartService_RestoreCart_Call { 1404 _c.Call.Run(func(args mock.Arguments) { 1405 run(args[0].(context.Context), args[1].(*cart.Cart)) 1406 }) 1407 return _c 1408 } 1409 1410 func (_c *CartService_RestoreCart_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_RestoreCart_Call { 1411 _c.Call.Return(_a0, _a1) 1412 return _c 1413 } 1414 1415 func (_c *CartService_RestoreCart_Call) RunAndReturn(run func(context.Context, *cart.Cart) (*cart.Cart, error)) *CartService_RestoreCart_Call { 1416 _c.Call.Return(run) 1417 return _c 1418 } 1419 1420 // UpdateAdditionalData provides a mock function with given fields: ctx, session, additionalData 1421 func (_m *CartService) UpdateAdditionalData(ctx context.Context, session *web.Session, additionalData map[string]string) (*cart.Cart, error) { 1422 ret := _m.Called(ctx, session, additionalData) 1423 1424 if len(ret) == 0 { 1425 panic("no return value specified for UpdateAdditionalData") 1426 } 1427 1428 var r0 *cart.Cart 1429 var r1 error 1430 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, map[string]string) (*cart.Cart, error)); ok { 1431 return rf(ctx, session, additionalData) 1432 } 1433 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, map[string]string) *cart.Cart); ok { 1434 r0 = rf(ctx, session, additionalData) 1435 } else { 1436 if ret.Get(0) != nil { 1437 r0 = ret.Get(0).(*cart.Cart) 1438 } 1439 } 1440 1441 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, map[string]string) error); ok { 1442 r1 = rf(ctx, session, additionalData) 1443 } else { 1444 r1 = ret.Error(1) 1445 } 1446 1447 return r0, r1 1448 } 1449 1450 // CartService_UpdateAdditionalData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateAdditionalData' 1451 type CartService_UpdateAdditionalData_Call struct { 1452 *mock.Call 1453 } 1454 1455 // UpdateAdditionalData is a helper method to define mock.On call 1456 // - ctx context.Context 1457 // - session *web.Session 1458 // - additionalData map[string]string 1459 func (_e *CartService_Expecter) UpdateAdditionalData(ctx interface{}, session interface{}, additionalData interface{}) *CartService_UpdateAdditionalData_Call { 1460 return &CartService_UpdateAdditionalData_Call{Call: _e.mock.On("UpdateAdditionalData", ctx, session, additionalData)} 1461 } 1462 1463 func (_c *CartService_UpdateAdditionalData_Call) Run(run func(ctx context.Context, session *web.Session, additionalData map[string]string)) *CartService_UpdateAdditionalData_Call { 1464 _c.Call.Run(func(args mock.Arguments) { 1465 run(args[0].(context.Context), args[1].(*web.Session), args[2].(map[string]string)) 1466 }) 1467 return _c 1468 } 1469 1470 func (_c *CartService_UpdateAdditionalData_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_UpdateAdditionalData_Call { 1471 _c.Call.Return(_a0, _a1) 1472 return _c 1473 } 1474 1475 func (_c *CartService_UpdateAdditionalData_Call) RunAndReturn(run func(context.Context, *web.Session, map[string]string) (*cart.Cart, error)) *CartService_UpdateAdditionalData_Call { 1476 _c.Call.Return(run) 1477 return _c 1478 } 1479 1480 // UpdateBillingAddress provides a mock function with given fields: ctx, session, billingAddress 1481 func (_m *CartService) UpdateBillingAddress(ctx context.Context, session *web.Session, billingAddress *cart.Address) error { 1482 ret := _m.Called(ctx, session, billingAddress) 1483 1484 if len(ret) == 0 { 1485 panic("no return value specified for UpdateBillingAddress") 1486 } 1487 1488 var r0 error 1489 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *cart.Address) error); ok { 1490 r0 = rf(ctx, session, billingAddress) 1491 } else { 1492 r0 = ret.Error(0) 1493 } 1494 1495 return r0 1496 } 1497 1498 // CartService_UpdateBillingAddress_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateBillingAddress' 1499 type CartService_UpdateBillingAddress_Call struct { 1500 *mock.Call 1501 } 1502 1503 // UpdateBillingAddress is a helper method to define mock.On call 1504 // - ctx context.Context 1505 // - session *web.Session 1506 // - billingAddress *cart.Address 1507 func (_e *CartService_Expecter) UpdateBillingAddress(ctx interface{}, session interface{}, billingAddress interface{}) *CartService_UpdateBillingAddress_Call { 1508 return &CartService_UpdateBillingAddress_Call{Call: _e.mock.On("UpdateBillingAddress", ctx, session, billingAddress)} 1509 } 1510 1511 func (_c *CartService_UpdateBillingAddress_Call) Run(run func(ctx context.Context, session *web.Session, billingAddress *cart.Address)) *CartService_UpdateBillingAddress_Call { 1512 _c.Call.Run(func(args mock.Arguments) { 1513 run(args[0].(context.Context), args[1].(*web.Session), args[2].(*cart.Address)) 1514 }) 1515 return _c 1516 } 1517 1518 func (_c *CartService_UpdateBillingAddress_Call) Return(_a0 error) *CartService_UpdateBillingAddress_Call { 1519 _c.Call.Return(_a0) 1520 return _c 1521 } 1522 1523 func (_c *CartService_UpdateBillingAddress_Call) RunAndReturn(run func(context.Context, *web.Session, *cart.Address) error) *CartService_UpdateBillingAddress_Call { 1524 _c.Call.Return(run) 1525 return _c 1526 } 1527 1528 // UpdateDeliveryAdditionalData provides a mock function with given fields: ctx, session, deliveryCode, additionalData 1529 func (_m *CartService) UpdateDeliveryAdditionalData(ctx context.Context, session *web.Session, deliveryCode string, additionalData map[string]string) (*cart.Cart, error) { 1530 ret := _m.Called(ctx, session, deliveryCode, additionalData) 1531 1532 if len(ret) == 0 { 1533 panic("no return value specified for UpdateDeliveryAdditionalData") 1534 } 1535 1536 var r0 *cart.Cart 1537 var r1 error 1538 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, map[string]string) (*cart.Cart, error)); ok { 1539 return rf(ctx, session, deliveryCode, additionalData) 1540 } 1541 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, map[string]string) *cart.Cart); ok { 1542 r0 = rf(ctx, session, deliveryCode, additionalData) 1543 } else { 1544 if ret.Get(0) != nil { 1545 r0 = ret.Get(0).(*cart.Cart) 1546 } 1547 } 1548 1549 if rf, ok := ret.Get(1).(func(context.Context, *web.Session, string, map[string]string) error); ok { 1550 r1 = rf(ctx, session, deliveryCode, additionalData) 1551 } else { 1552 r1 = ret.Error(1) 1553 } 1554 1555 return r0, r1 1556 } 1557 1558 // CartService_UpdateDeliveryAdditionalData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateDeliveryAdditionalData' 1559 type CartService_UpdateDeliveryAdditionalData_Call struct { 1560 *mock.Call 1561 } 1562 1563 // UpdateDeliveryAdditionalData is a helper method to define mock.On call 1564 // - ctx context.Context 1565 // - session *web.Session 1566 // - deliveryCode string 1567 // - additionalData map[string]string 1568 func (_e *CartService_Expecter) UpdateDeliveryAdditionalData(ctx interface{}, session interface{}, deliveryCode interface{}, additionalData interface{}) *CartService_UpdateDeliveryAdditionalData_Call { 1569 return &CartService_UpdateDeliveryAdditionalData_Call{Call: _e.mock.On("UpdateDeliveryAdditionalData", ctx, session, deliveryCode, additionalData)} 1570 } 1571 1572 func (_c *CartService_UpdateDeliveryAdditionalData_Call) Run(run func(ctx context.Context, session *web.Session, deliveryCode string, additionalData map[string]string)) *CartService_UpdateDeliveryAdditionalData_Call { 1573 _c.Call.Run(func(args mock.Arguments) { 1574 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string), args[3].(map[string]string)) 1575 }) 1576 return _c 1577 } 1578 1579 func (_c *CartService_UpdateDeliveryAdditionalData_Call) Return(_a0 *cart.Cart, _a1 error) *CartService_UpdateDeliveryAdditionalData_Call { 1580 _c.Call.Return(_a0, _a1) 1581 return _c 1582 } 1583 1584 func (_c *CartService_UpdateDeliveryAdditionalData_Call) RunAndReturn(run func(context.Context, *web.Session, string, map[string]string) (*cart.Cart, error)) *CartService_UpdateDeliveryAdditionalData_Call { 1585 _c.Call.Return(run) 1586 return _c 1587 } 1588 1589 // UpdateDeliveryInfo provides a mock function with given fields: ctx, session, deliveryCode, deliveryInfo 1590 func (_m *CartService) UpdateDeliveryInfo(ctx context.Context, session *web.Session, deliveryCode string, deliveryInfo cart.DeliveryInfoUpdateCommand) error { 1591 ret := _m.Called(ctx, session, deliveryCode, deliveryInfo) 1592 1593 if len(ret) == 0 { 1594 panic("no return value specified for UpdateDeliveryInfo") 1595 } 1596 1597 var r0 error 1598 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, cart.DeliveryInfoUpdateCommand) error); ok { 1599 r0 = rf(ctx, session, deliveryCode, deliveryInfo) 1600 } else { 1601 r0 = ret.Error(0) 1602 } 1603 1604 return r0 1605 } 1606 1607 // CartService_UpdateDeliveryInfo_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateDeliveryInfo' 1608 type CartService_UpdateDeliveryInfo_Call struct { 1609 *mock.Call 1610 } 1611 1612 // UpdateDeliveryInfo is a helper method to define mock.On call 1613 // - ctx context.Context 1614 // - session *web.Session 1615 // - deliveryCode string 1616 // - deliveryInfo cart.DeliveryInfoUpdateCommand 1617 func (_e *CartService_Expecter) UpdateDeliveryInfo(ctx interface{}, session interface{}, deliveryCode interface{}, deliveryInfo interface{}) *CartService_UpdateDeliveryInfo_Call { 1618 return &CartService_UpdateDeliveryInfo_Call{Call: _e.mock.On("UpdateDeliveryInfo", ctx, session, deliveryCode, deliveryInfo)} 1619 } 1620 1621 func (_c *CartService_UpdateDeliveryInfo_Call) Run(run func(ctx context.Context, session *web.Session, deliveryCode string, deliveryInfo cart.DeliveryInfoUpdateCommand)) *CartService_UpdateDeliveryInfo_Call { 1622 _c.Call.Run(func(args mock.Arguments) { 1623 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string), args[3].(cart.DeliveryInfoUpdateCommand)) 1624 }) 1625 return _c 1626 } 1627 1628 func (_c *CartService_UpdateDeliveryInfo_Call) Return(_a0 error) *CartService_UpdateDeliveryInfo_Call { 1629 _c.Call.Return(_a0) 1630 return _c 1631 } 1632 1633 func (_c *CartService_UpdateDeliveryInfo_Call) RunAndReturn(run func(context.Context, *web.Session, string, cart.DeliveryInfoUpdateCommand) error) *CartService_UpdateDeliveryInfo_Call { 1634 _c.Call.Return(run) 1635 return _c 1636 } 1637 1638 // UpdateItemBundleConfig provides a mock function with given fields: ctx, session, updateCommand 1639 func (_m *CartService) UpdateItemBundleConfig(ctx context.Context, session *web.Session, updateCommand cart.ItemUpdateCommand) error { 1640 ret := _m.Called(ctx, session, updateCommand) 1641 1642 if len(ret) == 0 { 1643 panic("no return value specified for UpdateItemBundleConfig") 1644 } 1645 1646 var r0 error 1647 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, cart.ItemUpdateCommand) error); ok { 1648 r0 = rf(ctx, session, updateCommand) 1649 } else { 1650 r0 = ret.Error(0) 1651 } 1652 1653 return r0 1654 } 1655 1656 // CartService_UpdateItemBundleConfig_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateItemBundleConfig' 1657 type CartService_UpdateItemBundleConfig_Call struct { 1658 *mock.Call 1659 } 1660 1661 // UpdateItemBundleConfig is a helper method to define mock.On call 1662 // - ctx context.Context 1663 // - session *web.Session 1664 // - updateCommand cart.ItemUpdateCommand 1665 func (_e *CartService_Expecter) UpdateItemBundleConfig(ctx interface{}, session interface{}, updateCommand interface{}) *CartService_UpdateItemBundleConfig_Call { 1666 return &CartService_UpdateItemBundleConfig_Call{Call: _e.mock.On("UpdateItemBundleConfig", ctx, session, updateCommand)} 1667 } 1668 1669 func (_c *CartService_UpdateItemBundleConfig_Call) Run(run func(ctx context.Context, session *web.Session, updateCommand cart.ItemUpdateCommand)) *CartService_UpdateItemBundleConfig_Call { 1670 _c.Call.Run(func(args mock.Arguments) { 1671 run(args[0].(context.Context), args[1].(*web.Session), args[2].(cart.ItemUpdateCommand)) 1672 }) 1673 return _c 1674 } 1675 1676 func (_c *CartService_UpdateItemBundleConfig_Call) Return(_a0 error) *CartService_UpdateItemBundleConfig_Call { 1677 _c.Call.Return(_a0) 1678 return _c 1679 } 1680 1681 func (_c *CartService_UpdateItemBundleConfig_Call) RunAndReturn(run func(context.Context, *web.Session, cart.ItemUpdateCommand) error) *CartService_UpdateItemBundleConfig_Call { 1682 _c.Call.Return(run) 1683 return _c 1684 } 1685 1686 // UpdateItemQty provides a mock function with given fields: ctx, session, itemID, deliveryCode, qty 1687 func (_m *CartService) UpdateItemQty(ctx context.Context, session *web.Session, itemID string, deliveryCode string, qty int) error { 1688 ret := _m.Called(ctx, session, itemID, deliveryCode, qty) 1689 1690 if len(ret) == 0 { 1691 panic("no return value specified for UpdateItemQty") 1692 } 1693 1694 var r0 error 1695 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, string, int) error); ok { 1696 r0 = rf(ctx, session, itemID, deliveryCode, qty) 1697 } else { 1698 r0 = ret.Error(0) 1699 } 1700 1701 return r0 1702 } 1703 1704 // CartService_UpdateItemQty_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateItemQty' 1705 type CartService_UpdateItemQty_Call struct { 1706 *mock.Call 1707 } 1708 1709 // UpdateItemQty is a helper method to define mock.On call 1710 // - ctx context.Context 1711 // - session *web.Session 1712 // - itemID string 1713 // - deliveryCode string 1714 // - qty int 1715 func (_e *CartService_Expecter) UpdateItemQty(ctx interface{}, session interface{}, itemID interface{}, deliveryCode interface{}, qty interface{}) *CartService_UpdateItemQty_Call { 1716 return &CartService_UpdateItemQty_Call{Call: _e.mock.On("UpdateItemQty", ctx, session, itemID, deliveryCode, qty)} 1717 } 1718 1719 func (_c *CartService_UpdateItemQty_Call) Run(run func(ctx context.Context, session *web.Session, itemID string, deliveryCode string, qty int)) *CartService_UpdateItemQty_Call { 1720 _c.Call.Run(func(args mock.Arguments) { 1721 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string), args[3].(string), args[4].(int)) 1722 }) 1723 return _c 1724 } 1725 1726 func (_c *CartService_UpdateItemQty_Call) Return(_a0 error) *CartService_UpdateItemQty_Call { 1727 _c.Call.Return(_a0) 1728 return _c 1729 } 1730 1731 func (_c *CartService_UpdateItemQty_Call) RunAndReturn(run func(context.Context, *web.Session, string, string, int) error) *CartService_UpdateItemQty_Call { 1732 _c.Call.Return(run) 1733 return _c 1734 } 1735 1736 // UpdateItemSourceID provides a mock function with given fields: ctx, session, itemID, sourceID 1737 func (_m *CartService) UpdateItemSourceID(ctx context.Context, session *web.Session, itemID string, sourceID string) error { 1738 ret := _m.Called(ctx, session, itemID, sourceID) 1739 1740 if len(ret) == 0 { 1741 panic("no return value specified for UpdateItemSourceID") 1742 } 1743 1744 var r0 error 1745 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, string) error); ok { 1746 r0 = rf(ctx, session, itemID, sourceID) 1747 } else { 1748 r0 = ret.Error(0) 1749 } 1750 1751 return r0 1752 } 1753 1754 // CartService_UpdateItemSourceID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateItemSourceID' 1755 type CartService_UpdateItemSourceID_Call struct { 1756 *mock.Call 1757 } 1758 1759 // UpdateItemSourceID is a helper method to define mock.On call 1760 // - ctx context.Context 1761 // - session *web.Session 1762 // - itemID string 1763 // - sourceID string 1764 func (_e *CartService_Expecter) UpdateItemSourceID(ctx interface{}, session interface{}, itemID interface{}, sourceID interface{}) *CartService_UpdateItemSourceID_Call { 1765 return &CartService_UpdateItemSourceID_Call{Call: _e.mock.On("UpdateItemSourceID", ctx, session, itemID, sourceID)} 1766 } 1767 1768 func (_c *CartService_UpdateItemSourceID_Call) Run(run func(ctx context.Context, session *web.Session, itemID string, sourceID string)) *CartService_UpdateItemSourceID_Call { 1769 _c.Call.Run(func(args mock.Arguments) { 1770 run(args[0].(context.Context), args[1].(*web.Session), args[2].(string), args[3].(string)) 1771 }) 1772 return _c 1773 } 1774 1775 func (_c *CartService_UpdateItemSourceID_Call) Return(_a0 error) *CartService_UpdateItemSourceID_Call { 1776 _c.Call.Return(_a0) 1777 return _c 1778 } 1779 1780 func (_c *CartService_UpdateItemSourceID_Call) RunAndReturn(run func(context.Context, *web.Session, string, string) error) *CartService_UpdateItemSourceID_Call { 1781 _c.Call.Return(run) 1782 return _c 1783 } 1784 1785 // UpdateItems provides a mock function with given fields: ctx, session, updateCommands 1786 func (_m *CartService) UpdateItems(ctx context.Context, session *web.Session, updateCommands []cart.ItemUpdateCommand) error { 1787 ret := _m.Called(ctx, session, updateCommands) 1788 1789 if len(ret) == 0 { 1790 panic("no return value specified for UpdateItems") 1791 } 1792 1793 var r0 error 1794 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, []cart.ItemUpdateCommand) error); ok { 1795 r0 = rf(ctx, session, updateCommands) 1796 } else { 1797 r0 = ret.Error(0) 1798 } 1799 1800 return r0 1801 } 1802 1803 // CartService_UpdateItems_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateItems' 1804 type CartService_UpdateItems_Call struct { 1805 *mock.Call 1806 } 1807 1808 // UpdateItems is a helper method to define mock.On call 1809 // - ctx context.Context 1810 // - session *web.Session 1811 // - updateCommands []cart.ItemUpdateCommand 1812 func (_e *CartService_Expecter) UpdateItems(ctx interface{}, session interface{}, updateCommands interface{}) *CartService_UpdateItems_Call { 1813 return &CartService_UpdateItems_Call{Call: _e.mock.On("UpdateItems", ctx, session, updateCommands)} 1814 } 1815 1816 func (_c *CartService_UpdateItems_Call) Run(run func(ctx context.Context, session *web.Session, updateCommands []cart.ItemUpdateCommand)) *CartService_UpdateItems_Call { 1817 _c.Call.Run(func(args mock.Arguments) { 1818 run(args[0].(context.Context), args[1].(*web.Session), args[2].([]cart.ItemUpdateCommand)) 1819 }) 1820 return _c 1821 } 1822 1823 func (_c *CartService_UpdateItems_Call) Return(_a0 error) *CartService_UpdateItems_Call { 1824 _c.Call.Return(_a0) 1825 return _c 1826 } 1827 1828 func (_c *CartService_UpdateItems_Call) RunAndReturn(run func(context.Context, *web.Session, []cart.ItemUpdateCommand) error) *CartService_UpdateItems_Call { 1829 _c.Call.Return(run) 1830 return _c 1831 } 1832 1833 // UpdatePaymentSelection provides a mock function with given fields: ctx, session, paymentSelection 1834 func (_m *CartService) UpdatePaymentSelection(ctx context.Context, session *web.Session, paymentSelection cart.PaymentSelection) error { 1835 ret := _m.Called(ctx, session, paymentSelection) 1836 1837 if len(ret) == 0 { 1838 panic("no return value specified for UpdatePaymentSelection") 1839 } 1840 1841 var r0 error 1842 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, cart.PaymentSelection) error); ok { 1843 r0 = rf(ctx, session, paymentSelection) 1844 } else { 1845 r0 = ret.Error(0) 1846 } 1847 1848 return r0 1849 } 1850 1851 // CartService_UpdatePaymentSelection_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePaymentSelection' 1852 type CartService_UpdatePaymentSelection_Call struct { 1853 *mock.Call 1854 } 1855 1856 // UpdatePaymentSelection is a helper method to define mock.On call 1857 // - ctx context.Context 1858 // - session *web.Session 1859 // - paymentSelection cart.PaymentSelection 1860 func (_e *CartService_Expecter) UpdatePaymentSelection(ctx interface{}, session interface{}, paymentSelection interface{}) *CartService_UpdatePaymentSelection_Call { 1861 return &CartService_UpdatePaymentSelection_Call{Call: _e.mock.On("UpdatePaymentSelection", ctx, session, paymentSelection)} 1862 } 1863 1864 func (_c *CartService_UpdatePaymentSelection_Call) Run(run func(ctx context.Context, session *web.Session, paymentSelection cart.PaymentSelection)) *CartService_UpdatePaymentSelection_Call { 1865 _c.Call.Run(func(args mock.Arguments) { 1866 run(args[0].(context.Context), args[1].(*web.Session), args[2].(cart.PaymentSelection)) 1867 }) 1868 return _c 1869 } 1870 1871 func (_c *CartService_UpdatePaymentSelection_Call) Return(_a0 error) *CartService_UpdatePaymentSelection_Call { 1872 _c.Call.Return(_a0) 1873 return _c 1874 } 1875 1876 func (_c *CartService_UpdatePaymentSelection_Call) RunAndReturn(run func(context.Context, *web.Session, cart.PaymentSelection) error) *CartService_UpdatePaymentSelection_Call { 1877 _c.Call.Return(run) 1878 return _c 1879 } 1880 1881 // UpdatePurchaser provides a mock function with given fields: ctx, session, purchaser, additionalData 1882 func (_m *CartService) UpdatePurchaser(ctx context.Context, session *web.Session, purchaser *cart.Person, additionalData *cart.AdditionalData) error { 1883 ret := _m.Called(ctx, session, purchaser, additionalData) 1884 1885 if len(ret) == 0 { 1886 panic("no return value specified for UpdatePurchaser") 1887 } 1888 1889 var r0 error 1890 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *cart.Person, *cart.AdditionalData) error); ok { 1891 r0 = rf(ctx, session, purchaser, additionalData) 1892 } else { 1893 r0 = ret.Error(0) 1894 } 1895 1896 return r0 1897 } 1898 1899 // CartService_UpdatePurchaser_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdatePurchaser' 1900 type CartService_UpdatePurchaser_Call struct { 1901 *mock.Call 1902 } 1903 1904 // UpdatePurchaser is a helper method to define mock.On call 1905 // - ctx context.Context 1906 // - session *web.Session 1907 // - purchaser *cart.Person 1908 // - additionalData *cart.AdditionalData 1909 func (_e *CartService_Expecter) UpdatePurchaser(ctx interface{}, session interface{}, purchaser interface{}, additionalData interface{}) *CartService_UpdatePurchaser_Call { 1910 return &CartService_UpdatePurchaser_Call{Call: _e.mock.On("UpdatePurchaser", ctx, session, purchaser, additionalData)} 1911 } 1912 1913 func (_c *CartService_UpdatePurchaser_Call) Run(run func(ctx context.Context, session *web.Session, purchaser *cart.Person, additionalData *cart.AdditionalData)) *CartService_UpdatePurchaser_Call { 1914 _c.Call.Run(func(args mock.Arguments) { 1915 run(args[0].(context.Context), args[1].(*web.Session), args[2].(*cart.Person), args[3].(*cart.AdditionalData)) 1916 }) 1917 return _c 1918 } 1919 1920 func (_c *CartService_UpdatePurchaser_Call) Return(_a0 error) *CartService_UpdatePurchaser_Call { 1921 _c.Call.Return(_a0) 1922 return _c 1923 } 1924 1925 func (_c *CartService_UpdatePurchaser_Call) RunAndReturn(run func(context.Context, *web.Session, *cart.Person, *cart.AdditionalData) error) *CartService_UpdatePurchaser_Call { 1926 _c.Call.Return(run) 1927 return _c 1928 } 1929 1930 // ValidateCart provides a mock function with given fields: ctx, session, decoratedCart 1931 func (_m *CartService) ValidateCart(ctx context.Context, session *web.Session, decoratedCart *decorator.DecoratedCart) validation.Result { 1932 ret := _m.Called(ctx, session, decoratedCart) 1933 1934 if len(ret) == 0 { 1935 panic("no return value specified for ValidateCart") 1936 } 1937 1938 var r0 validation.Result 1939 if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *decorator.DecoratedCart) validation.Result); ok { 1940 r0 = rf(ctx, session, decoratedCart) 1941 } else { 1942 r0 = ret.Get(0).(validation.Result) 1943 } 1944 1945 return r0 1946 } 1947 1948 // CartService_ValidateCart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateCart' 1949 type CartService_ValidateCart_Call struct { 1950 *mock.Call 1951 } 1952 1953 // ValidateCart is a helper method to define mock.On call 1954 // - ctx context.Context 1955 // - session *web.Session 1956 // - decoratedCart *decorator.DecoratedCart 1957 func (_e *CartService_Expecter) ValidateCart(ctx interface{}, session interface{}, decoratedCart interface{}) *CartService_ValidateCart_Call { 1958 return &CartService_ValidateCart_Call{Call: _e.mock.On("ValidateCart", ctx, session, decoratedCart)} 1959 } 1960 1961 func (_c *CartService_ValidateCart_Call) Run(run func(ctx context.Context, session *web.Session, decoratedCart *decorator.DecoratedCart)) *CartService_ValidateCart_Call { 1962 _c.Call.Run(func(args mock.Arguments) { 1963 run(args[0].(context.Context), args[1].(*web.Session), args[2].(*decorator.DecoratedCart)) 1964 }) 1965 return _c 1966 } 1967 1968 func (_c *CartService_ValidateCart_Call) Return(_a0 validation.Result) *CartService_ValidateCart_Call { 1969 _c.Call.Return(_a0) 1970 return _c 1971 } 1972 1973 func (_c *CartService_ValidateCart_Call) RunAndReturn(run func(context.Context, *web.Session, *decorator.DecoratedCart) validation.Result) *CartService_ValidateCart_Call { 1974 _c.Call.Return(run) 1975 return _c 1976 } 1977 1978 // ValidateCurrentCart provides a mock function with given fields: ctx, session 1979 func (_m *CartService) ValidateCurrentCart(ctx context.Context, session *web.Session) (validation.Result, error) { 1980 ret := _m.Called(ctx, session) 1981 1982 if len(ret) == 0 { 1983 panic("no return value specified for ValidateCurrentCart") 1984 } 1985 1986 var r0 validation.Result 1987 var r1 error 1988 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (validation.Result, error)); ok { 1989 return rf(ctx, session) 1990 } 1991 if rf, ok := ret.Get(0).(func(context.Context, *web.Session) validation.Result); ok { 1992 r0 = rf(ctx, session) 1993 } else { 1994 r0 = ret.Get(0).(validation.Result) 1995 } 1996 1997 if rf, ok := ret.Get(1).(func(context.Context, *web.Session) error); ok { 1998 r1 = rf(ctx, session) 1999 } else { 2000 r1 = ret.Error(1) 2001 } 2002 2003 return r0, r1 2004 } 2005 2006 // CartService_ValidateCurrentCart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ValidateCurrentCart' 2007 type CartService_ValidateCurrentCart_Call struct { 2008 *mock.Call 2009 } 2010 2011 // ValidateCurrentCart is a helper method to define mock.On call 2012 // - ctx context.Context 2013 // - session *web.Session 2014 func (_e *CartService_Expecter) ValidateCurrentCart(ctx interface{}, session interface{}) *CartService_ValidateCurrentCart_Call { 2015 return &CartService_ValidateCurrentCart_Call{Call: _e.mock.On("ValidateCurrentCart", ctx, session)} 2016 } 2017 2018 func (_c *CartService_ValidateCurrentCart_Call) Run(run func(ctx context.Context, session *web.Session)) *CartService_ValidateCurrentCart_Call { 2019 _c.Call.Run(func(args mock.Arguments) { 2020 run(args[0].(context.Context), args[1].(*web.Session)) 2021 }) 2022 return _c 2023 } 2024 2025 func (_c *CartService_ValidateCurrentCart_Call) Return(_a0 validation.Result, _a1 error) *CartService_ValidateCurrentCart_Call { 2026 _c.Call.Return(_a0, _a1) 2027 return _c 2028 } 2029 2030 func (_c *CartService_ValidateCurrentCart_Call) RunAndReturn(run func(context.Context, *web.Session) (validation.Result, error)) *CartService_ValidateCurrentCart_Call { 2031 _c.Call.Return(run) 2032 return _c 2033 } 2034 2035 // NewCartService creates a new instance of CartService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 2036 // The first argument is typically a *testing.T value. 2037 func NewCartService(t interface { 2038 mock.TestingT 2039 Cleanup(func()) 2040 }) *CartService { 2041 mock := &CartService{} 2042 mock.Mock.Test(t) 2043 2044 t.Cleanup(func() { mock.AssertExpectations(t) }) 2045 2046 return mock 2047 }