From 0c232570971505fc9b1cd401447b473663e1e2dc Mon Sep 17 00:00:00 2001 From: Manish Prajapati Date: Wed, 9 Oct 2024 18:15:47 +0530 Subject: [PATCH] ID: FPCO-24112; Update arguments of updated getProducts method --- .../com/fynd/example/java/controller/PlatformController.java | 2 +- .../fynd/example/java/controller/PlatformControllerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/fynd/example/java/controller/PlatformController.java b/src/main/java/com/fynd/example/java/controller/PlatformController.java index 5858f57..bf3f70f 100644 --- a/src/main/java/com/fynd/example/java/controller/PlatformController.java +++ b/src/main/java/com/fynd/example/java/controller/PlatformController.java @@ -22,7 +22,7 @@ public class PlatformController extends BasePlatformController { public CatalogPlatformModels.ProductListingResponseV2 getProducts(HttpServletRequest request) { try { PlatformClient platformClient = (PlatformClient) request.getAttribute("platformClient"); - return platformClient.catalog.getProducts(Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), "", Collections.emptyList(), 1, 10); + return platformClient.catalog.getProducts(Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), "", "",Collections.emptyList(), "", Collections.emptyList(),1, 10, "", "", ""); } catch (Exception e) { System.out.println(e.getMessage()); diff --git a/src/test/java/com/fynd/example/java/controller/PlatformControllerTest.java b/src/test/java/com/fynd/example/java/controller/PlatformControllerTest.java index d3c2741..e7a5fce 100644 --- a/src/test/java/com/fynd/example/java/controller/PlatformControllerTest.java +++ b/src/test/java/com/fynd/example/java/controller/PlatformControllerTest.java @@ -71,7 +71,7 @@ void testGetAppProducts_Exception() throws FDKServerResponseError, FDKException @Test void testGetProducts_Success() throws Exception { CatalogPlatformModels.ProductListingResponseV2 mockResponse = new CatalogPlatformModels.ProductListingResponseV2(); - when(catalogPlatformService.getProducts(anyList(), anyList(), anyList(), anyList(), anyList(), anyString(), anyList(), anyInt(), anyInt())) + when(catalogPlatformService.getProducts(anyList(), anyList(), anyList(), anyList(), anyList(), anyString(), anyString(), anyList(), anyString(), anyList(), anyInt(), anyInt(), anyString(), anyString(), anyString())) .thenReturn(mockResponse); CatalogPlatformModels.ProductListingResponseV2 response = platformController.getProducts(request); assertEquals(mockResponse, response); @@ -79,7 +79,7 @@ void testGetProducts_Success() throws Exception { @Test void testGetProducts_Exception() throws FDKServerResponseError, FDKException { - when(catalogPlatformService.getProducts(anyList(), anyList(), anyList(), anyList(), anyList(), anyString(), anyList(), anyInt(), anyInt())) + when(catalogPlatformService.getProducts(anyList(), anyList(), anyList(), anyList(), anyList(), anyString(), anyString(), anyList(), anyString(), anyList(), anyInt(), anyInt(), anyString(), anyString(), anyString())) .thenThrow(new RuntimeException("Error")); RuntimeException exception = assertThrows(RuntimeException.class, () -> { platformController.getProducts(request);