Untitled
unknown
java
a year ago
913 B
3
Indexable
@Test public void testProductwiseBrandSchemes_Success() { // Mock data int providerId = 1; int offset = 0; int size = 10; List<BrandScheme> brandSchemeList = new ArrayList<>(); // Populate with test data // Populate other necessary mock data when(brandSchemeRepository.findByStatusAndSellerIdAndOrderByStartValueAndDiscountIsZero(any(), any())) .thenReturn(brandSchemeList); when(skuDiscountRepository.findDiscountsAndSubProducts(any(), any(Pageable.class))) .thenReturn(mock(Page.class)); // Execute the function ResponseEntity<MinistoreResponse> responseEntity = brandSchemeService.productwiseBrandSchemes(providerId, offset, size); // Assertions assertEquals(HttpStatus.OK, responseEntity.getStatusCode()); // Add more assertions based on the expected results }
Editor is loading...
Leave a Comment