diff --git a/cart/application/cartCache.go b/cart/application/cartCache.go index d5905f1c3..c888f3b38 100644 --- a/cart/application/cartCache.go +++ b/cart/application/cartCache.go @@ -16,7 +16,7 @@ import ( "github.com/pkg/errors" ) -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name CartCache --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name CartCache --case snake type ( // CartCache describes a cart caches methods diff --git a/cart/application/eventHandling.go b/cart/application/eventHandling.go index 8b2762a7a..5a54102d4 100644 --- a/cart/application/eventHandling.go +++ b/cart/application/eventHandling.go @@ -13,7 +13,7 @@ import ( cartDomain "flamingo.me/flamingo-commerce/v3/cart/domain/cart" ) -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name CartMerger --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name CartMerger --case snake type ( // EventReceiver handles events from other packages diff --git a/cart/application/mocks/cart_cache.go b/cart/application/mocks/cart_cache.go index 39d6acbd1..9e7d69238 100644 --- a/cart/application/mocks/cart_cache.go +++ b/cart/application/mocks/cart_cache.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -30,6 +30,10 @@ func (_m *CartCache) EXPECT() *CartCache_Expecter { func (_m *CartCache) BuildIdentifier(_a0 context.Context, _a1 *web.Session) (application.CartCacheIdentifier, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for BuildIdentifier") + } + var r0 application.CartCacheIdentifier var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (application.CartCacheIdentifier, error)); ok { @@ -83,6 +87,10 @@ func (_c *CartCache_BuildIdentifier_Call) RunAndReturn(run func(context.Context, func (_m *CartCache) CacheCart(_a0 context.Context, _a1 *web.Session, _a2 application.CartCacheIdentifier, _a3 *cart.Cart) error { ret := _m.Called(_a0, _a1, _a2, _a3) + if len(ret) == 0 { + panic("no return value specified for CacheCart") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, application.CartCacheIdentifier, *cart.Cart) error); ok { r0 = rf(_a0, _a1, _a2, _a3) @@ -128,6 +136,10 @@ func (_c *CartCache_CacheCart_Call) RunAndReturn(run func(context.Context, *web. func (_m *CartCache) Delete(_a0 context.Context, _a1 *web.Session, _a2 application.CartCacheIdentifier) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for Delete") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, application.CartCacheIdentifier) error); ok { r0 = rf(_a0, _a1, _a2) @@ -172,6 +184,10 @@ func (_c *CartCache_Delete_Call) RunAndReturn(run func(context.Context, *web.Ses func (_m *CartCache) DeleteAll(_a0 context.Context, _a1 *web.Session) error { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for DeleteAll") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) error); ok { r0 = rf(_a0, _a1) @@ -215,6 +231,10 @@ func (_c *CartCache_DeleteAll_Call) RunAndReturn(run func(context.Context, *web. func (_m *CartCache) GetCart(_a0 context.Context, _a1 *web.Session, _a2 application.CartCacheIdentifier) (*cart.Cart, error) { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for GetCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, application.CartCacheIdentifier) (*cart.Cart, error)); ok { @@ -271,6 +291,10 @@ func (_c *CartCache_GetCart_Call) RunAndReturn(run func(context.Context, *web.Se func (_m *CartCache) Invalidate(_a0 context.Context, _a1 *web.Session, _a2 application.CartCacheIdentifier) error { ret := _m.Called(_a0, _a1, _a2) + if len(ret) == 0 { + panic("no return value specified for Invalidate") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, application.CartCacheIdentifier) error); ok { r0 = rf(_a0, _a1, _a2) diff --git a/cart/application/mocks/cart_merger.go b/cart/application/mocks/cart_merger.go index a765e8f11..160801d68 100644 --- a/cart/application/mocks/cart_merger.go +++ b/cart/application/mocks/cart_merger.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks diff --git a/cart/application/mocks/receiver.go b/cart/application/mocks/receiver.go index bcc34b9a2..ac14440ea 100644 --- a/cart/application/mocks/receiver.go +++ b/cart/application/mocks/receiver.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -29,6 +29,10 @@ func (_m *CartReceiver) EXPECT() *CartReceiver_Expecter { func (_m *CartReceiver) GetCart(ctx context.Context, session *web.Session) (*cart.Cart, cart.ModifyBehaviour, error) { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for GetCart") + } + var r0 *cart.Cart var r1 cart.ModifyBehaviour var r2 error @@ -93,6 +97,10 @@ func (_c *CartReceiver_GetCart_Call) RunAndReturn(run func(context.Context, *web func (_m *CartReceiver) GetCartWithoutCache(ctx context.Context, session *web.Session) (*cart.Cart, error) { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for GetCartWithoutCache") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (*cart.Cart, error)); ok { @@ -148,6 +156,10 @@ func (_c *CartReceiver_GetCartWithoutCache_Call) RunAndReturn(run func(context.C func (_m *CartReceiver) ModifyBehaviour(ctx context.Context) (cart.ModifyBehaviour, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for ModifyBehaviour") + } + var r0 cart.ModifyBehaviour var r1 error if rf, ok := ret.Get(0).(func(context.Context) (cart.ModifyBehaviour, error)); ok { @@ -202,6 +214,10 @@ func (_c *CartReceiver_ModifyBehaviour_Call) RunAndReturn(run func(context.Conte func (_m *CartReceiver) ShouldHaveCart(ctx context.Context, session *web.Session) bool { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for ShouldHaveCart") + } + var r0 bool if rf, ok := ret.Get(0).(func(context.Context, *web.Session) bool); ok { r0 = rf(ctx, session) @@ -245,6 +261,10 @@ func (_c *CartReceiver_ShouldHaveCart_Call) RunAndReturn(run func(context.Contex func (_m *CartReceiver) ShouldHaveGuestCart(session *web.Session) bool { ret := _m.Called(session) + if len(ret) == 0 { + panic("no return value specified for ShouldHaveGuestCart") + } + var r0 bool if rf, ok := ret.Get(0).(func(*web.Session) bool); ok { r0 = rf(session) @@ -287,6 +307,10 @@ func (_c *CartReceiver_ShouldHaveGuestCart_Call) RunAndReturn(run func(*web.Sess func (_m *CartReceiver) ViewCart(ctx context.Context, session *web.Session) (*cart.Cart, error) { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for ViewCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (*cart.Cart, error)); ok { @@ -342,6 +366,10 @@ func (_c *CartReceiver_ViewCart_Call) RunAndReturn(run func(context.Context, *we func (_m *CartReceiver) ViewGuestCart(ctx context.Context, session *web.Session) (*cart.Cart, error) { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for ViewGuestCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (*cart.Cart, error)); ok { diff --git a/cart/application/mocks/service.go b/cart/application/mocks/service.go index 43f201348..936a15a01 100644 --- a/cart/application/mocks/service.go +++ b/cart/application/mocks/service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -38,6 +38,10 @@ func (_m *CartService) EXPECT() *CartService_Expecter { func (_m *CartService) AddProduct(ctx context.Context, session *web.Session, deliveryCode string, addRequest cart.AddRequest) (domain.BasicProduct, error) { ret := _m.Called(ctx, session, deliveryCode, addRequest) + if len(ret) == 0 { + panic("no return value specified for AddProduct") + } + var r0 domain.BasicProduct var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, cart.AddRequest) (domain.BasicProduct, error)); ok { @@ -95,6 +99,10 @@ func (_c *CartService_AddProduct_Call) RunAndReturn(run func(context.Context, *w func (_m *CartService) AdjustItemsToRestrictedQty(ctx context.Context, session *web.Session) (application.QtyAdjustmentResults, error) { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for AdjustItemsToRestrictedQty") + } + var r0 application.QtyAdjustmentResults var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (application.QtyAdjustmentResults, error)); ok { @@ -150,6 +158,10 @@ func (_c *CartService_AdjustItemsToRestrictedQty_Call) RunAndReturn(run func(con func (_m *CartService) ApplyAny(ctx context.Context, session *web.Session, anyCode string) (*cart.Cart, error) { ret := _m.Called(ctx, session, anyCode) + if len(ret) == 0 { + panic("no return value specified for ApplyAny") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { @@ -206,6 +218,10 @@ func (_c *CartService_ApplyAny_Call) RunAndReturn(run func(context.Context, *web func (_m *CartService) ApplyGiftCard(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error) { ret := _m.Called(ctx, session, couponCode) + if len(ret) == 0 { + panic("no return value specified for ApplyGiftCard") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { @@ -262,6 +278,10 @@ func (_c *CartService_ApplyGiftCard_Call) RunAndReturn(run func(context.Context, func (_m *CartService) ApplyVoucher(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error) { ret := _m.Called(ctx, session, couponCode) + if len(ret) == 0 { + panic("no return value specified for ApplyVoucher") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { @@ -318,6 +338,10 @@ func (_c *CartService_ApplyVoucher_Call) RunAndReturn(run func(context.Context, func (_m *CartService) BuildAddRequest(ctx context.Context, marketplaceCode string, variantMarketplaceCode string, qty int, additionalData map[string]string) cart.AddRequest { ret := _m.Called(ctx, marketplaceCode, variantMarketplaceCode, qty, additionalData) + if len(ret) == 0 { + panic("no return value specified for BuildAddRequest") + } + var r0 cart.AddRequest if rf, ok := ret.Get(0).(func(context.Context, string, string, int, map[string]string) cart.AddRequest); ok { r0 = rf(ctx, marketplaceCode, variantMarketplaceCode, qty, additionalData) @@ -364,6 +388,10 @@ func (_c *CartService_BuildAddRequest_Call) RunAndReturn(run func(context.Contex func (_m *CartService) CancelOrder(ctx context.Context, session *web.Session, orderInfos placeorder.PlacedOrderInfos, _a3 cart.Cart) (*cart.Cart, error) { ret := _m.Called(ctx, session, orderInfos, _a3) + if len(ret) == 0 { + panic("no return value specified for CancelOrder") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, placeorder.PlacedOrderInfos, cart.Cart) (*cart.Cart, error)); ok { @@ -421,6 +449,10 @@ func (_c *CartService_CancelOrder_Call) RunAndReturn(run func(context.Context, * func (_m *CartService) CancelOrderWithoutRestore(ctx context.Context, session *web.Session, orderInfos placeorder.PlacedOrderInfos) error { ret := _m.Called(ctx, session, orderInfos) + if len(ret) == 0 { + panic("no return value specified for CancelOrderWithoutRestore") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, placeorder.PlacedOrderInfos) error); ok { r0 = rf(ctx, session, orderInfos) @@ -465,6 +497,10 @@ func (_c *CartService_CancelOrderWithoutRestore_Call) RunAndReturn(run func(cont func (_m *CartService) Clean(ctx context.Context, session *web.Session) error { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for Clean") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) error); ok { r0 = rf(ctx, session) @@ -508,6 +544,10 @@ func (_c *CartService_Clean_Call) RunAndReturn(run func(context.Context, *web.Se func (_m *CartService) CompleteCurrentCart(ctx context.Context) (*cart.Cart, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for CompleteCurrentCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*cart.Cart, error)); ok { @@ -562,6 +602,10 @@ func (_c *CartService_CompleteCurrentCart_Call) RunAndReturn(run func(context.Co func (_m *CartService) CreateInitialDeliveryIfNotPresent(ctx context.Context, session *web.Session, deliveryCode string) (*cart.Cart, error) { ret := _m.Called(ctx, session, deliveryCode) + if len(ret) == 0 { + panic("no return value specified for CreateInitialDeliveryIfNotPresent") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { @@ -618,6 +662,10 @@ func (_c *CartService_CreateInitialDeliveryIfNotPresent_Call) RunAndReturn(run f func (_m *CartService) DeleteAllItems(ctx context.Context, session *web.Session) error { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for DeleteAllItems") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) error); ok { r0 = rf(ctx, session) @@ -696,6 +744,10 @@ func (_c *CartService_DeleteCartInCache_Call) RunAndReturn(run func(context.Cont func (_m *CartService) DeleteDelivery(ctx context.Context, session *web.Session, deliveryCode string) (*cart.Cart, error) { ret := _m.Called(ctx, session, deliveryCode) + if len(ret) == 0 { + panic("no return value specified for DeleteDelivery") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { @@ -752,6 +804,10 @@ func (_c *CartService_DeleteDelivery_Call) RunAndReturn(run func(context.Context func (_m *CartService) DeleteItem(ctx context.Context, session *web.Session, itemID string, deliveryCode string) error { ret := _m.Called(ctx, session, itemID, deliveryCode) + if len(ret) == 0 { + panic("no return value specified for DeleteItem") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, string) error); ok { r0 = rf(ctx, session, itemID, deliveryCode) @@ -797,6 +853,10 @@ func (_c *CartService_DeleteItem_Call) RunAndReturn(run func(context.Context, *w func (_m *CartService) ForceReserveOrderIDAndSave(ctx context.Context, session *web.Session) (*cart.Cart, error) { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for ForceReserveOrderIDAndSave") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (*cart.Cart, error)); ok { @@ -852,6 +912,10 @@ func (_c *CartService_ForceReserveOrderIDAndSave_Call) RunAndReturn(run func(con func (_m *CartService) GetCartReceiverService() *application.CartReceiverService { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetCartReceiverService") + } + var r0 *application.CartReceiverService if rf, ok := ret.Get(0).(func() *application.CartReceiverService); ok { r0 = rf() @@ -895,6 +959,10 @@ func (_c *CartService_GetCartReceiverService_Call) RunAndReturn(run func() *appl func (_m *CartService) GetDefaultDeliveryCode() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetDefaultDeliveryCode") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -936,6 +1004,10 @@ func (_c *CartService_GetDefaultDeliveryCode_Call) RunAndReturn(run func() strin func (_m *CartService) GetInitialDelivery(deliveryCode string) (*cart.DeliveryInfo, error) { ret := _m.Called(deliveryCode) + if len(ret) == 0 { + panic("no return value specified for GetInitialDelivery") + } + var r0 *cart.DeliveryInfo var r1 error if rf, ok := ret.Get(0).(func(string) (*cart.DeliveryInfo, error)); ok { @@ -990,6 +1062,10 @@ func (_c *CartService_GetInitialDelivery_Call) RunAndReturn(run func(string) (*c func (_m *CartService) PlaceOrder(ctx context.Context, session *web.Session, payment *placeorder.Payment) (placeorder.PlacedOrderInfos, error) { ret := _m.Called(ctx, session, payment) + if len(ret) == 0 { + panic("no return value specified for PlaceOrder") + } + var r0 placeorder.PlacedOrderInfos var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *placeorder.Payment) (placeorder.PlacedOrderInfos, error)); ok { @@ -1046,6 +1122,10 @@ func (_c *CartService_PlaceOrder_Call) RunAndReturn(run func(context.Context, *w func (_m *CartService) PlaceOrderWithCart(ctx context.Context, session *web.Session, _a2 *cart.Cart, payment *placeorder.Payment) (placeorder.PlacedOrderInfos, error) { ret := _m.Called(ctx, session, _a2, payment) + if len(ret) == 0 { + panic("no return value specified for PlaceOrderWithCart") + } + var r0 placeorder.PlacedOrderInfos var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *cart.Cart, *placeorder.Payment) (placeorder.PlacedOrderInfos, error)); ok { @@ -1103,6 +1183,10 @@ func (_c *CartService_PlaceOrderWithCart_Call) RunAndReturn(run func(context.Con func (_m *CartService) RemoveGiftCard(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error) { ret := _m.Called(ctx, session, couponCode) + if len(ret) == 0 { + panic("no return value specified for RemoveGiftCard") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { @@ -1159,6 +1243,10 @@ func (_c *CartService_RemoveGiftCard_Call) RunAndReturn(run func(context.Context func (_m *CartService) RemoveVoucher(ctx context.Context, session *web.Session, couponCode string) (*cart.Cart, error) { ret := _m.Called(ctx, session, couponCode) + if len(ret) == 0 { + panic("no return value specified for RemoveVoucher") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string) (*cart.Cart, error)); ok { @@ -1215,6 +1303,10 @@ func (_c *CartService_RemoveVoucher_Call) RunAndReturn(run func(context.Context, func (_m *CartService) ReserveOrderIDAndSave(ctx context.Context, session *web.Session) (*cart.Cart, error) { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for ReserveOrderIDAndSave") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (*cart.Cart, error)); ok { @@ -1270,6 +1362,10 @@ func (_c *CartService_ReserveOrderIDAndSave_Call) RunAndReturn(run func(context. func (_m *CartService) RestoreCart(ctx context.Context, _a1 *cart.Cart) (*cart.Cart, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for RestoreCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart) (*cart.Cart, error)); ok { @@ -1325,6 +1421,10 @@ func (_c *CartService_RestoreCart_Call) RunAndReturn(run func(context.Context, * func (_m *CartService) UpdateAdditionalData(ctx context.Context, session *web.Session, additionalData map[string]string) (*cart.Cart, error) { ret := _m.Called(ctx, session, additionalData) + if len(ret) == 0 { + panic("no return value specified for UpdateAdditionalData") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, map[string]string) (*cart.Cart, error)); ok { @@ -1381,6 +1481,10 @@ func (_c *CartService_UpdateAdditionalData_Call) RunAndReturn(run func(context.C func (_m *CartService) UpdateBillingAddress(ctx context.Context, session *web.Session, billingAddress *cart.Address) error { ret := _m.Called(ctx, session, billingAddress) + if len(ret) == 0 { + panic("no return value specified for UpdateBillingAddress") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *cart.Address) error); ok { r0 = rf(ctx, session, billingAddress) @@ -1425,6 +1529,10 @@ func (_c *CartService_UpdateBillingAddress_Call) RunAndReturn(run func(context.C func (_m *CartService) UpdateDeliveryAdditionalData(ctx context.Context, session *web.Session, deliveryCode string, additionalData map[string]string) (*cart.Cart, error) { ret := _m.Called(ctx, session, deliveryCode, additionalData) + if len(ret) == 0 { + panic("no return value specified for UpdateDeliveryAdditionalData") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, map[string]string) (*cart.Cart, error)); ok { @@ -1482,6 +1590,10 @@ func (_c *CartService_UpdateDeliveryAdditionalData_Call) RunAndReturn(run func(c func (_m *CartService) UpdateDeliveryInfo(ctx context.Context, session *web.Session, deliveryCode string, deliveryInfo cart.DeliveryInfoUpdateCommand) error { ret := _m.Called(ctx, session, deliveryCode, deliveryInfo) + if len(ret) == 0 { + panic("no return value specified for UpdateDeliveryInfo") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, cart.DeliveryInfoUpdateCommand) error); ok { r0 = rf(ctx, session, deliveryCode, deliveryInfo) @@ -1527,6 +1639,10 @@ func (_c *CartService_UpdateDeliveryInfo_Call) RunAndReturn(run func(context.Con func (_m *CartService) UpdateItemBundleConfig(ctx context.Context, session *web.Session, updateCommand cart.ItemUpdateCommand) error { ret := _m.Called(ctx, session, updateCommand) + if len(ret) == 0 { + panic("no return value specified for UpdateItemBundleConfig") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, cart.ItemUpdateCommand) error); ok { r0 = rf(ctx, session, updateCommand) @@ -1571,6 +1687,10 @@ func (_c *CartService_UpdateItemBundleConfig_Call) RunAndReturn(run func(context func (_m *CartService) UpdateItemQty(ctx context.Context, session *web.Session, itemID string, deliveryCode string, qty int) error { ret := _m.Called(ctx, session, itemID, deliveryCode, qty) + if len(ret) == 0 { + panic("no return value specified for UpdateItemQty") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, string, int) error); ok { r0 = rf(ctx, session, itemID, deliveryCode, qty) @@ -1617,6 +1737,10 @@ func (_c *CartService_UpdateItemQty_Call) RunAndReturn(run func(context.Context, func (_m *CartService) UpdateItemSourceID(ctx context.Context, session *web.Session, itemID string, sourceID string) error { ret := _m.Called(ctx, session, itemID, sourceID) + if len(ret) == 0 { + panic("no return value specified for UpdateItemSourceID") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, string, string) error); ok { r0 = rf(ctx, session, itemID, sourceID) @@ -1662,6 +1786,10 @@ func (_c *CartService_UpdateItemSourceID_Call) RunAndReturn(run func(context.Con func (_m *CartService) UpdateItems(ctx context.Context, session *web.Session, updateCommands []cart.ItemUpdateCommand) error { ret := _m.Called(ctx, session, updateCommands) + if len(ret) == 0 { + panic("no return value specified for UpdateItems") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, []cart.ItemUpdateCommand) error); ok { r0 = rf(ctx, session, updateCommands) @@ -1706,6 +1834,10 @@ func (_c *CartService_UpdateItems_Call) RunAndReturn(run func(context.Context, * func (_m *CartService) UpdatePaymentSelection(ctx context.Context, session *web.Session, paymentSelection cart.PaymentSelection) error { ret := _m.Called(ctx, session, paymentSelection) + if len(ret) == 0 { + panic("no return value specified for UpdatePaymentSelection") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, cart.PaymentSelection) error); ok { r0 = rf(ctx, session, paymentSelection) @@ -1750,6 +1882,10 @@ func (_c *CartService_UpdatePaymentSelection_Call) RunAndReturn(run func(context func (_m *CartService) UpdatePurchaser(ctx context.Context, session *web.Session, purchaser *cart.Person, additionalData *cart.AdditionalData) error { ret := _m.Called(ctx, session, purchaser, additionalData) + if len(ret) == 0 { + panic("no return value specified for UpdatePurchaser") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *cart.Person, *cart.AdditionalData) error); ok { r0 = rf(ctx, session, purchaser, additionalData) @@ -1795,6 +1931,10 @@ func (_c *CartService_UpdatePurchaser_Call) RunAndReturn(run func(context.Contex func (_m *CartService) ValidateCart(ctx context.Context, session *web.Session, decoratedCart *decorator.DecoratedCart) validation.Result { ret := _m.Called(ctx, session, decoratedCart) + if len(ret) == 0 { + panic("no return value specified for ValidateCart") + } + var r0 validation.Result if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *decorator.DecoratedCart) validation.Result); ok { r0 = rf(ctx, session, decoratedCart) @@ -1839,6 +1979,10 @@ func (_c *CartService_ValidateCart_Call) RunAndReturn(run func(context.Context, func (_m *CartService) ValidateCurrentCart(ctx context.Context, session *web.Session) (validation.Result, error) { ret := _m.Called(ctx, session) + if len(ret) == 0 { + panic("no return value specified for ValidateCurrentCart") + } + var r0 validation.Result var r1 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session) (validation.Result, error)); ok { diff --git a/cart/application/receiver.go b/cart/application/receiver.go index d5287011d..112176963 100644 --- a/cart/application/receiver.go +++ b/cart/application/receiver.go @@ -1,6 +1,6 @@ package application -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name Receiver --case snake --structname CartReceiver +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name Receiver --case snake --structname CartReceiver import ( "context" diff --git a/cart/application/service.go b/cart/application/service.go index a9630b4f0..bd054eb2b 100644 --- a/cart/application/service.go +++ b/cart/application/service.go @@ -1,6 +1,6 @@ package application -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name Service --case snake --structname CartService +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name Service --case snake --structname CartService import ( "context" diff --git a/cart/domain/cart/cartServicePorts.go b/cart/domain/cart/cartServicePorts.go index 710c67f2d..40f30cdf0 100644 --- a/cart/domain/cart/cartServicePorts.go +++ b/cart/domain/cart/cartServicePorts.go @@ -1,11 +1,11 @@ package cart -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name CompleteBehaviour --case snake -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name CustomerCartService --case snake -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name GiftCardAndVoucherBehaviour --case snake -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name GiftCardBehaviour --case snake -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name GuestCartService --case snake -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name ModifyBehaviour --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name CompleteBehaviour --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name CustomerCartService --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name GiftCardAndVoucherBehaviour --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name GiftCardBehaviour --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name GuestCartService --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name ModifyBehaviour --case snake import ( "context" diff --git a/cart/domain/cart/mocks/complete_behaviour.go b/cart/domain/cart/mocks/complete_behaviour.go index 28182ecfd..5f3747e38 100644 --- a/cart/domain/cart/mocks/complete_behaviour.go +++ b/cart/domain/cart/mocks/complete_behaviour.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *CompleteBehaviour) EXPECT() *CompleteBehaviour_Expecter { func (_m *CompleteBehaviour) Complete(_a0 context.Context, _a1 *cart.Cart) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Complete") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -91,6 +95,10 @@ func (_c *CompleteBehaviour_Complete_Call) RunAndReturn(run func(context.Context func (_m *CompleteBehaviour) Restore(_a0 context.Context, _a1 *cart.Cart) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for Restore") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error diff --git a/cart/domain/cart/mocks/customer_cart_service.go b/cart/domain/cart/mocks/customer_cart_service.go index e8dba378f..63d739004 100644 --- a/cart/domain/cart/mocks/customer_cart_service.go +++ b/cart/domain/cart/mocks/customer_cart_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -28,6 +28,10 @@ func (_m *CustomerCartService) EXPECT() *CustomerCartService_Expecter { func (_m *CustomerCartService) GetCart(ctx context.Context, identity auth.Identity, cartID string) (*cart.Cart, error) { ret := _m.Called(ctx, identity, cartID) + if len(ret) == 0 { + panic("no return value specified for GetCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, auth.Identity, string) (*cart.Cart, error)); ok { @@ -84,6 +88,10 @@ func (_c *CustomerCartService_GetCart_Call) RunAndReturn(run func(context.Contex func (_m *CustomerCartService) GetModifyBehaviour(_a0 context.Context, _a1 auth.Identity) (cart.ModifyBehaviour, error) { ret := _m.Called(_a0, _a1) + if len(ret) == 0 { + panic("no return value specified for GetModifyBehaviour") + } + var r0 cart.ModifyBehaviour var r1 error if rf, ok := ret.Get(0).(func(context.Context, auth.Identity) (cart.ModifyBehaviour, error)); ok { @@ -139,6 +147,10 @@ func (_c *CustomerCartService_GetModifyBehaviour_Call) RunAndReturn(run func(con func (_m *CustomerCartService) RestoreCart(ctx context.Context, identity auth.Identity, _a2 cart.Cart) (*cart.Cart, error) { ret := _m.Called(ctx, identity, _a2) + if len(ret) == 0 { + panic("no return value specified for RestoreCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, auth.Identity, cart.Cart) (*cart.Cart, error)); ok { diff --git a/cart/domain/cart/mocks/gift_card_and_voucher_behaviour.go b/cart/domain/cart/mocks/gift_card_and_voucher_behaviour.go index a8a421f87..0289c766e 100644 --- a/cart/domain/cart/mocks/gift_card_and_voucher_behaviour.go +++ b/cart/domain/cart/mocks/gift_card_and_voucher_behaviour.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *GiftCardAndVoucherBehaviour) EXPECT() *GiftCardAndVoucherBehaviour_Exp func (_m *GiftCardAndVoucherBehaviour) ApplyAny(ctx context.Context, _a1 *cart.Cart, anyCode string) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, anyCode) + if len(ret) == 0 { + panic("no return value specified for ApplyAny") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error diff --git a/cart/domain/cart/mocks/gift_card_behaviour.go b/cart/domain/cart/mocks/gift_card_behaviour.go index 2b4c0f8b5..e335385a2 100644 --- a/cart/domain/cart/mocks/gift_card_behaviour.go +++ b/cart/domain/cart/mocks/gift_card_behaviour.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *GiftCardBehaviour) EXPECT() *GiftCardBehaviour_Expecter { func (_m *GiftCardBehaviour) ApplyGiftCard(ctx context.Context, _a1 *cart.Cart, giftCardCode string) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, giftCardCode) + if len(ret) == 0 { + panic("no return value specified for ApplyGiftCard") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -92,6 +96,10 @@ func (_c *GiftCardBehaviour_ApplyGiftCard_Call) RunAndReturn(run func(context.Co func (_m *GiftCardBehaviour) RemoveGiftCard(ctx context.Context, _a1 *cart.Cart, giftCardCode string) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, giftCardCode) + if len(ret) == 0 { + panic("no return value specified for RemoveGiftCard") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error diff --git a/cart/domain/cart/mocks/guest_cart_service.go b/cart/domain/cart/mocks/guest_cart_service.go index a7b602e8b..6f6f99b22 100644 --- a/cart/domain/cart/mocks/guest_cart_service.go +++ b/cart/domain/cart/mocks/guest_cart_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *GuestCartService) EXPECT() *GuestCartService_Expecter { func (_m *GuestCartService) GetCart(ctx context.Context, cartID string) (*cart.Cart, error) { ret := _m.Called(ctx, cartID) + if len(ret) == 0 { + panic("no return value specified for GetCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (*cart.Cart, error)); ok { @@ -82,6 +86,10 @@ func (_c *GuestCartService_GetCart_Call) RunAndReturn(run func(context.Context, func (_m *GuestCartService) GetModifyBehaviour(_a0 context.Context) (cart.ModifyBehaviour, error) { ret := _m.Called(_a0) + if len(ret) == 0 { + panic("no return value specified for GetModifyBehaviour") + } + var r0 cart.ModifyBehaviour var r1 error if rf, ok := ret.Get(0).(func(context.Context) (cart.ModifyBehaviour, error)); ok { @@ -136,6 +144,10 @@ func (_c *GuestCartService_GetModifyBehaviour_Call) RunAndReturn(run func(contex func (_m *GuestCartService) GetNewCart(ctx context.Context) (*cart.Cart, error) { ret := _m.Called(ctx) + if len(ret) == 0 { + panic("no return value specified for GetNewCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context) (*cart.Cart, error)); ok { @@ -190,6 +202,10 @@ func (_c *GuestCartService_GetNewCart_Call) RunAndReturn(run func(context.Contex func (_m *GuestCartService) RestoreCart(ctx context.Context, _a1 cart.Cart) (*cart.Cart, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for RestoreCart") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, cart.Cart) (*cart.Cart, error)); ok { diff --git a/cart/domain/cart/mocks/modify_behaviour.go b/cart/domain/cart/mocks/modify_behaviour.go index c42fec0a9..87c78c23b 100644 --- a/cart/domain/cart/mocks/modify_behaviour.go +++ b/cart/domain/cart/mocks/modify_behaviour.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *ModifyBehaviour) EXPECT() *ModifyBehaviour_Expecter { func (_m *ModifyBehaviour) AddToCart(ctx context.Context, _a1 *cart.Cart, deliveryCode string, addRequest cart.AddRequest) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, deliveryCode, addRequest) + if len(ret) == 0 { + panic("no return value specified for AddToCart") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -93,6 +97,10 @@ func (_c *ModifyBehaviour_AddToCart_Call) RunAndReturn(run func(context.Context, func (_m *ModifyBehaviour) ApplyVoucher(ctx context.Context, _a1 *cart.Cart, couponCode string) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, couponCode) + if len(ret) == 0 { + panic("no return value specified for ApplyVoucher") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -158,6 +166,10 @@ func (_c *ModifyBehaviour_ApplyVoucher_Call) RunAndReturn(run func(context.Conte func (_m *ModifyBehaviour) CleanCart(ctx context.Context, _a1 *cart.Cart) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1) + if len(ret) == 0 { + panic("no return value specified for CleanCart") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -222,6 +234,10 @@ func (_c *ModifyBehaviour_CleanCart_Call) RunAndReturn(run func(context.Context, func (_m *ModifyBehaviour) CleanDelivery(ctx context.Context, _a1 *cart.Cart, deliveryCode string) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, deliveryCode) + if len(ret) == 0 { + panic("no return value specified for CleanDelivery") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -287,6 +303,10 @@ func (_c *ModifyBehaviour_CleanDelivery_Call) RunAndReturn(run func(context.Cont func (_m *ModifyBehaviour) DeleteItem(ctx context.Context, _a1 *cart.Cart, itemID string, deliveryCode string) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, itemID, deliveryCode) + if len(ret) == 0 { + panic("no return value specified for DeleteItem") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -353,6 +373,10 @@ func (_c *ModifyBehaviour_DeleteItem_Call) RunAndReturn(run func(context.Context func (_m *ModifyBehaviour) RemoveVoucher(ctx context.Context, _a1 *cart.Cart, couponCode string) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, couponCode) + if len(ret) == 0 { + panic("no return value specified for RemoveVoucher") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -418,6 +442,10 @@ func (_c *ModifyBehaviour_RemoveVoucher_Call) RunAndReturn(run func(context.Cont func (_m *ModifyBehaviour) UpdateAdditionalData(ctx context.Context, _a1 *cart.Cart, additionalData *cart.AdditionalData) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, additionalData) + if len(ret) == 0 { + panic("no return value specified for UpdateAdditionalData") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -483,6 +511,10 @@ func (_c *ModifyBehaviour_UpdateAdditionalData_Call) RunAndReturn(run func(conte func (_m *ModifyBehaviour) UpdateBillingAddress(ctx context.Context, _a1 *cart.Cart, billingAddress cart.Address) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, billingAddress) + if len(ret) == 0 { + panic("no return value specified for UpdateBillingAddress") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -548,6 +580,10 @@ func (_c *ModifyBehaviour_UpdateBillingAddress_Call) RunAndReturn(run func(conte func (_m *ModifyBehaviour) UpdateDeliveryInfo(ctx context.Context, _a1 *cart.Cart, deliveryCode string, deliveryInfo cart.DeliveryInfoUpdateCommand) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, deliveryCode, deliveryInfo) + if len(ret) == 0 { + panic("no return value specified for UpdateDeliveryInfo") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -614,6 +650,10 @@ func (_c *ModifyBehaviour_UpdateDeliveryInfo_Call) RunAndReturn(run func(context func (_m *ModifyBehaviour) UpdateDeliveryInfoAdditionalData(ctx context.Context, _a1 *cart.Cart, deliveryCode string, additionalData *cart.AdditionalData) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, deliveryCode, additionalData) + if len(ret) == 0 { + panic("no return value specified for UpdateDeliveryInfoAdditionalData") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -680,6 +720,10 @@ func (_c *ModifyBehaviour_UpdateDeliveryInfoAdditionalData_Call) RunAndReturn(ru func (_m *ModifyBehaviour) UpdateItem(ctx context.Context, _a1 *cart.Cart, itemUpdateCommand cart.ItemUpdateCommand) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, itemUpdateCommand) + if len(ret) == 0 { + panic("no return value specified for UpdateItem") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -745,6 +789,10 @@ func (_c *ModifyBehaviour_UpdateItem_Call) RunAndReturn(run func(context.Context func (_m *ModifyBehaviour) UpdateItems(ctx context.Context, _a1 *cart.Cart, itemUpdateCommands []cart.ItemUpdateCommand) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, itemUpdateCommands) + if len(ret) == 0 { + panic("no return value specified for UpdateItems") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -810,6 +858,10 @@ func (_c *ModifyBehaviour_UpdateItems_Call) RunAndReturn(run func(context.Contex func (_m *ModifyBehaviour) UpdatePaymentSelection(ctx context.Context, _a1 *cart.Cart, paymentSelection cart.PaymentSelection) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, paymentSelection) + if len(ret) == 0 { + panic("no return value specified for UpdatePaymentSelection") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error @@ -875,6 +927,10 @@ func (_c *ModifyBehaviour_UpdatePaymentSelection_Call) RunAndReturn(run func(con func (_m *ModifyBehaviour) UpdatePurchaser(ctx context.Context, _a1 *cart.Cart, purchaser *cart.Person, additionalData *cart.AdditionalData) (*cart.Cart, cart.DeferEvents, error) { ret := _m.Called(ctx, _a1, purchaser, additionalData) + if len(ret) == 0 { + panic("no return value specified for UpdatePurchaser") + } + var r0 *cart.Cart var r1 cart.DeferEvents var r2 error diff --git a/cart/domain/validation/itemValidator.go b/cart/domain/validation/itemValidator.go index 7827c2d18..78957d38f 100644 --- a/cart/domain/validation/itemValidator.go +++ b/cart/domain/validation/itemValidator.go @@ -12,7 +12,7 @@ import ( "flamingo.me/flamingo-commerce/v3/product/domain" ) -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name ItemValidator --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name ItemValidator --case snake type ( // ItemValidator checks a cart item diff --git a/cart/domain/validation/mocks/item_validator.go b/cart/domain/validation/mocks/item_validator.go index 2be991a7d..2f4d3f6db 100644 --- a/cart/domain/validation/mocks/item_validator.go +++ b/cart/domain/validation/mocks/item_validator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -33,6 +33,10 @@ func (_m *ItemValidator) EXPECT() *ItemValidator_Expecter { func (_m *ItemValidator) Validate(ctx context.Context, session *web.Session, _a2 *decorator.DecoratedCart, deliveryCode string, request cart.AddRequest, product domain.BasicProduct) error { ret := _m.Called(ctx, session, _a2, deliveryCode, request, product) + if len(ret) == 0 { + panic("no return value specified for Validate") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *web.Session, *decorator.DecoratedCart, string, cart.AddRequest, domain.BasicProduct) error); ok { r0 = rf(ctx, session, _a2, deliveryCode, request, product) diff --git a/cart/infrastructure/defaultCartBehaviour.go b/cart/infrastructure/defaultCartBehaviour.go index d96fc7065..aa359c4b7 100644 --- a/cart/infrastructure/defaultCartBehaviour.go +++ b/cart/infrastructure/defaultCartBehaviour.go @@ -18,8 +18,8 @@ import ( "flamingo.me/flamingo-commerce/v3/product/domain" ) -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name GiftCardHandler --case snake -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name VoucherHandler --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name GiftCardHandler --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name VoucherHandler --case snake type ( // DefaultCartBehaviour defines the default cart order behaviour diff --git a/cart/infrastructure/mocks/gift_card_handler.go b/cart/infrastructure/mocks/gift_card_handler.go index 7b60cdc97..035469c27 100644 --- a/cart/infrastructure/mocks/gift_card_handler.go +++ b/cart/infrastructure/mocks/gift_card_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *GiftCardHandler) EXPECT() *GiftCardHandler_Expecter { func (_m *GiftCardHandler) ApplyGiftCard(ctx context.Context, _a1 *cart.Cart, giftCardCode string) (*cart.Cart, error) { ret := _m.Called(ctx, _a1, giftCardCode) + if len(ret) == 0 { + panic("no return value specified for ApplyGiftCard") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart, string) (*cart.Cart, error)); ok { @@ -83,6 +87,10 @@ func (_c *GiftCardHandler_ApplyGiftCard_Call) RunAndReturn(run func(context.Cont func (_m *GiftCardHandler) RemoveGiftCard(ctx context.Context, _a1 *cart.Cart, giftCardCode string) (*cart.Cart, error) { ret := _m.Called(ctx, _a1, giftCardCode) + if len(ret) == 0 { + panic("no return value specified for RemoveGiftCard") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart, string) (*cart.Cart, error)); ok { diff --git a/cart/infrastructure/mocks/voucher_handler.go b/cart/infrastructure/mocks/voucher_handler.go index 6a9198588..47070994e 100644 --- a/cart/infrastructure/mocks/voucher_handler.go +++ b/cart/infrastructure/mocks/voucher_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -27,6 +27,10 @@ func (_m *VoucherHandler) EXPECT() *VoucherHandler_Expecter { func (_m *VoucherHandler) ApplyVoucher(ctx context.Context, _a1 *cart.Cart, couponCode string) (*cart.Cart, error) { ret := _m.Called(ctx, _a1, couponCode) + if len(ret) == 0 { + panic("no return value specified for ApplyVoucher") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart, string) (*cart.Cart, error)); ok { @@ -83,6 +87,10 @@ func (_c *VoucherHandler_ApplyVoucher_Call) RunAndReturn(run func(context.Contex func (_m *VoucherHandler) RemoveVoucher(ctx context.Context, _a1 *cart.Cart, couponCode string) (*cart.Cart, error) { ret := _m.Called(ctx, _a1, couponCode) + if len(ret) == 0 { + panic("no return value specified for RemoveVoucher") + } + var r0 *cart.Cart var r1 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart, string) (*cart.Cart, error)); ok { diff --git a/category/domain/mocks/category_service.go b/category/domain/mocks/category_service.go index 2df1e5397..0a6de8fd1 100644 --- a/category/domain/mocks/category_service.go +++ b/category/domain/mocks/category_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *CategoryService) EXPECT() *CategoryService_Expecter { func (_m *CategoryService) Get(ctx context.Context, categoryCode string) (domain.Category, error) { ret := _m.Called(ctx, categoryCode) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 domain.Category var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (domain.Category, error)); ok { @@ -81,6 +85,10 @@ func (_c *CategoryService_Get_Call) RunAndReturn(run func(context.Context, strin func (_m *CategoryService) Tree(ctx context.Context, activeCategoryCode string) (domain.Tree, error) { ret := _m.Called(ctx, activeCategoryCode) + if len(ret) == 0 { + panic("no return value specified for Tree") + } + var r0 domain.Tree var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (domain.Tree, error)); ok { diff --git a/category/domain/service.go b/category/domain/service.go index 7324fffea..df40ec4f4 100644 --- a/category/domain/service.go +++ b/category/domain/service.go @@ -10,7 +10,7 @@ var ( ErrNotFound = errors.New("category not found") ) -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name CategoryService --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name CategoryService --case snake type ( // CategoryService interface diff --git a/category/interfaces/controller/mocks/product_search_service.go b/category/interfaces/controller/mocks/product_search_service.go index 45b3dc052..9b27721c8 100644 --- a/category/interfaces/controller/mocks/product_search_service.go +++ b/category/interfaces/controller/mocks/product_search_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -29,6 +29,10 @@ func (_m *ProductSearchService) EXPECT() *ProductSearchService_Expecter { func (_m *ProductSearchService) Find(ctx context.Context, searchRequest *application.SearchRequest) (*productapplication.SearchResult, error) { ret := _m.Called(ctx, searchRequest) + if len(ret) == 0 { + panic("no return value specified for Find") + } + var r0 *productapplication.SearchResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *application.SearchRequest) (*productapplication.SearchResult, error)); ok { diff --git a/category/interfaces/controller/querycommand.go b/category/interfaces/controller/querycommand.go index 868e3f06c..6c261a251 100644 --- a/category/interfaces/controller/querycommand.go +++ b/category/interfaces/controller/querycommand.go @@ -15,7 +15,7 @@ import ( "flamingo.me/flamingo-commerce/v3/search/utils" ) -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name ProductSearchService --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name ProductSearchService --case snake type ( // QueryHandler provides the base command logic that is agnostic to the actual view type diff --git a/customer/domain/customer.go b/customer/domain/customer.go index 5d9a1c051..a6c56b7fe 100644 --- a/customer/domain/customer.go +++ b/customer/domain/customer.go @@ -1,7 +1,7 @@ package domain -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name Customer --case snake -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name CustomerIdentityService --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name Customer --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name CustomerIdentityService --case snake import ( "context" diff --git a/customer/domain/mocks/customer.go b/customer/domain/mocks/customer.go index 72d9c6e91..cb3aa05ee 100644 --- a/customer/domain/mocks/customer.go +++ b/customer/domain/mocks/customer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -24,6 +24,10 @@ func (_m *Customer) EXPECT() *Customer_Expecter { func (_m *Customer) GetAddresses() []domain.Address { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetAddresses") + } + var r0 []domain.Address if rf, ok := ret.Get(0).(func() []domain.Address); ok { r0 = rf() @@ -67,6 +71,10 @@ func (_c *Customer_GetAddresses_Call) RunAndReturn(run func() []domain.Address) func (_m *Customer) GetDefaultBillingAddress() *domain.Address { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetDefaultBillingAddress") + } + var r0 *domain.Address if rf, ok := ret.Get(0).(func() *domain.Address); ok { r0 = rf() @@ -110,6 +118,10 @@ func (_c *Customer_GetDefaultBillingAddress_Call) RunAndReturn(run func() *domai func (_m *Customer) GetDefaultShippingAddress() *domain.Address { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetDefaultShippingAddress") + } + var r0 *domain.Address if rf, ok := ret.Get(0).(func() *domain.Address); ok { r0 = rf() @@ -153,6 +165,10 @@ func (_c *Customer_GetDefaultShippingAddress_Call) RunAndReturn(run func() *doma func (_m *Customer) GetID() string { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetID") + } + var r0 string if rf, ok := ret.Get(0).(func() string); ok { r0 = rf() @@ -194,6 +210,10 @@ func (_c *Customer_GetID_Call) RunAndReturn(run func() string) *Customer_GetID_C func (_m *Customer) GetPersonalData() domain.PersonData { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for GetPersonalData") + } + var r0 domain.PersonData if rf, ok := ret.Get(0).(func() domain.PersonData); ok { r0 = rf() diff --git a/customer/domain/mocks/customer_identity_service.go b/customer/domain/mocks/customer_identity_service.go index 5d680d398..34e0e4a06 100644 --- a/customer/domain/mocks/customer_identity_service.go +++ b/customer/domain/mocks/customer_identity_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -29,6 +29,10 @@ func (_m *CustomerIdentityService) EXPECT() *CustomerIdentityService_Expecter { func (_m *CustomerIdentityService) GetByIdentity(ctx context.Context, identity auth.Identity) (domain.Customer, error) { ret := _m.Called(ctx, identity) + if len(ret) == 0 { + panic("no return value specified for GetByIdentity") + } + var r0 domain.Customer var r1 error if rf, ok := ret.Get(0).(func(context.Context, auth.Identity) (domain.Customer, error)); ok { diff --git a/payment/interfaces/mocks/web_cart_payment_gateway.go b/payment/interfaces/mocks/web_cart_payment_gateway.go index 2b9335e80..f63fab366 100644 --- a/payment/interfaces/mocks/web_cart_payment_gateway.go +++ b/payment/interfaces/mocks/web_cart_payment_gateway.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -33,6 +33,10 @@ func (_m *WebCartPaymentGateway) EXPECT() *WebCartPaymentGateway_Expecter { func (_m *WebCartPaymentGateway) CancelOrderPayment(ctx context.Context, cartPayment *placeorder.Payment) error { ret := _m.Called(ctx, cartPayment) + if len(ret) == 0 { + panic("no return value specified for CancelOrderPayment") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *placeorder.Payment) error); ok { r0 = rf(ctx, cartPayment) @@ -76,6 +80,10 @@ func (_c *WebCartPaymentGateway_CancelOrderPayment_Call) RunAndReturn(run func(c func (_m *WebCartPaymentGateway) ConfirmResult(ctx context.Context, _a1 *cart.Cart, cartPayment *placeorder.Payment) error { ret := _m.Called(ctx, _a1, cartPayment) + if len(ret) == 0 { + panic("no return value specified for ConfirmResult") + } + var r0 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart, *placeorder.Payment) error); ok { r0 = rf(ctx, _a1, cartPayment) @@ -120,6 +128,10 @@ func (_c *WebCartPaymentGateway_ConfirmResult_Call) RunAndReturn(run func(contex func (_m *WebCartPaymentGateway) FlowStatus(ctx context.Context, _a1 *cart.Cart, correlationID string) (*domain.FlowStatus, error) { ret := _m.Called(ctx, _a1, correlationID) + if len(ret) == 0 { + panic("no return value specified for FlowStatus") + } + var r0 *domain.FlowStatus var r1 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart, string) (*domain.FlowStatus, error)); ok { @@ -176,6 +188,10 @@ func (_c *WebCartPaymentGateway_FlowStatus_Call) RunAndReturn(run func(context.C func (_m *WebCartPaymentGateway) Methods() []domain.Method { ret := _m.Called() + if len(ret) == 0 { + panic("no return value specified for Methods") + } + var r0 []domain.Method if rf, ok := ret.Get(0).(func() []domain.Method); ok { r0 = rf() @@ -219,6 +235,10 @@ func (_c *WebCartPaymentGateway_Methods_Call) RunAndReturn(run func() []domain.M func (_m *WebCartPaymentGateway) OrderPaymentFromFlow(ctx context.Context, _a1 *cart.Cart, correlationID string) (*placeorder.Payment, error) { ret := _m.Called(ctx, _a1, correlationID) + if len(ret) == 0 { + panic("no return value specified for OrderPaymentFromFlow") + } + var r0 *placeorder.Payment var r1 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart, string) (*placeorder.Payment, error)); ok { @@ -275,6 +295,10 @@ func (_c *WebCartPaymentGateway_OrderPaymentFromFlow_Call) RunAndReturn(run func func (_m *WebCartPaymentGateway) StartFlow(ctx context.Context, _a1 *cart.Cart, correlationID string, returnURL *url.URL) (*domain.FlowResult, error) { ret := _m.Called(ctx, _a1, correlationID, returnURL) + if len(ret) == 0 { + panic("no return value specified for StartFlow") + } + var r0 *domain.FlowResult var r1 error if rf, ok := ret.Get(0).(func(context.Context, *cart.Cart, string, *url.URL) (*domain.FlowResult, error)); ok { diff --git a/payment/interfaces/webpayment.go b/payment/interfaces/webpayment.go index f8529bec8..37ada8838 100644 --- a/payment/interfaces/webpayment.go +++ b/payment/interfaces/webpayment.go @@ -9,7 +9,7 @@ import ( "flamingo.me/flamingo-commerce/v3/payment/domain" ) -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name WebCartPaymentGateway --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name WebCartPaymentGateway --case snake type ( // WebCartPaymentGatewayProvider defines the map of providers for payment providers diff --git a/product/domain/mocks/product_service.go b/product/domain/mocks/product_service.go index caf4acb18..cb72f615a 100644 --- a/product/domain/mocks/product_service.go +++ b/product/domain/mocks/product_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.32.4. DO NOT EDIT. +// Code generated by mockery v2.40.1. DO NOT EDIT. package mocks @@ -26,6 +26,10 @@ func (_m *ProductService) EXPECT() *ProductService_Expecter { func (_m *ProductService) Get(ctx context.Context, marketplaceCode string) (domain.BasicProduct, error) { ret := _m.Called(ctx, marketplaceCode) + if len(ret) == 0 { + panic("no return value specified for Get") + } + var r0 domain.BasicProduct var r1 error if rf, ok := ret.Get(0).(func(context.Context, string) (domain.BasicProduct, error)); ok { diff --git a/product/domain/productService.go b/product/domain/productService.go index 0478cc721..ef9e70296 100644 --- a/product/domain/productService.go +++ b/product/domain/productService.go @@ -7,7 +7,7 @@ import ( searchDomain "flamingo.me/flamingo-commerce/v3/search/domain" ) -//go:generate go run github.com/vektra/mockery/v2@v2.32.4 --name ProductService --case snake +//go:generate go run github.com/vektra/mockery/v2@v2.40.1 --name ProductService --case snake type ( // ProductService interface