Skip to content

Commit 8f2962d

Browse files
ID: FPCO-24112; Update arguments of updated getProducts method
1 parent e1d8b9a commit 8f2962d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/fynd/example/java/controller/PlatformController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class PlatformController extends BasePlatformController {
2222
public CatalogPlatformModels.ProductListingResponseV2 getProducts(HttpServletRequest request) {
2323
try {
2424
PlatformClient platformClient = (PlatformClient) request.getAttribute("platformClient");
25-
return platformClient.catalog.getProducts(Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), "", Collections.emptyList(), 1, 10);
25+
return platformClient.catalog.getProducts(Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), "", "", Collections.emptyList(), "", Collections.emptyList(), 1, 10, "", "", "");
2626

2727
} catch (Exception e) {
2828
System.out.println(e.getMessage());

src/test/java/com/fynd/example/java/controller/PlatformControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ void testGetAppProducts_Exception() throws FDKServerResponseError, FDKException
7171
@Test
7272
void testGetProducts_Success() throws Exception {
7373
CatalogPlatformModels.ProductListingResponseV2 mockResponse = new CatalogPlatformModels.ProductListingResponseV2();
74-
when(catalogPlatformService.getProducts(anyList(), anyList(), anyList(), anyList(), anyList(), anyString(), anyList(), anyInt(), anyInt()))
74+
when(catalogPlatformService.getProducts(anyList(), anyList(), anyList(), anyList(), anyList(), anyString(), anyString(), anyList(), anyString(), anyList(), anyInt(), anyInt(), anyString(), anyString(), anyString()))
7575
.thenReturn(mockResponse);
7676
CatalogPlatformModels.ProductListingResponseV2 response = platformController.getProducts(request);
7777
assertEquals(mockResponse, response);
7878
}
7979

8080
@Test
8181
void testGetProducts_Exception() throws FDKServerResponseError, FDKException {
82-
when(catalogPlatformService.getProducts(anyList(), anyList(), anyList(), anyList(), anyList(), anyString(), anyList(), anyInt(), anyInt()))
82+
when(catalogPlatformService.getProducts(anyList(), anyList(), anyList(), anyList(), anyList(), anyString(), anyString(), anyList(), anyString(), anyList(), anyInt(), anyInt(), anyString(), anyString(), anyString()))
8383
.thenThrow(new RuntimeException("Error"));
8484
RuntimeException exception = assertThrows(RuntimeException.class, () -> {
8585
platformController.getProducts(request);

0 commit comments

Comments
 (0)