|
20 | 20 | import uk.gov.laa.ccms.data.model.CaseStatusLookupDetail;
|
21 | 21 | import uk.gov.laa.ccms.data.model.CategoryOfLawLookupDetail;
|
22 | 22 | import uk.gov.laa.ccms.data.model.CommonLookupDetail;
|
| 23 | +import uk.gov.laa.ccms.data.model.EvidenceDocumentTypeLookupDetail; |
23 | 24 | import uk.gov.laa.ccms.data.model.OutcomeResultLookupDetail;
|
24 | 25 | import uk.gov.laa.ccms.data.model.RelationshipToCaseLookupDetail;
|
25 | 26 | import uk.gov.laa.ccms.data.model.StageEndLookupDetail;
|
@@ -313,4 +314,31 @@ public void testGetCategoriesOfLaw(String code, String desc, Boolean copyCostLim
|
313 | 314 | assertNotNull(result);
|
314 | 315 | assertEquals(expectedElements, result.getTotalElements());
|
315 | 316 | }
|
| 317 | + |
| 318 | + @ParameterizedTest |
| 319 | + @Sql(statements = { |
| 320 | + "INSERT INTO XXCCMS_EVIDENCE_DOC_TYPE_V (LOV_TYPE, CODE, DESCRIPTION) " + |
| 321 | + "VALUES ('TYPE1', 'CODE1', 'description 1')", |
| 322 | + "INSERT INTO XXCCMS_EVIDENCE_DOC_TYPE_V (LOV_TYPE, CODE, DESCRIPTION) " + |
| 323 | + "VALUES ('TYPE1', 'CODE2', 'description 2')", |
| 324 | + "INSERT INTO XXCCMS_EVIDENCE_DOC_TYPE_V (LOV_TYPE, CODE, DESCRIPTION) " + |
| 325 | + "VALUES ('TYPE2', 'CODE2', 'description 3')", |
| 326 | + }) |
| 327 | + @CsvSource(value= { |
| 328 | + "TYPE1, null, 2", |
| 329 | + "TYPE1, CODE2, 1", |
| 330 | + "null, CODE2, 2"}, |
| 331 | + nullValues={"null"}) |
| 332 | + public void testGetEvidenceDocumentTypes(String type, String code, Integer expectedElements) { |
| 333 | + // Create a pageable object |
| 334 | + Pageable pageable = PageRequest.of(0, 10); |
| 335 | + |
| 336 | + // Call the service method |
| 337 | + EvidenceDocumentTypeLookupDetail result = lookupService.getEvidenceDocumentTypeLookupValues( |
| 338 | + type, code, pageable); |
| 339 | + |
| 340 | + // Assert the result |
| 341 | + assertNotNull(result); |
| 342 | + assertEquals(expectedElements, result.getTotalElements()); |
| 343 | + } |
316 | 344 | }
|
0 commit comments