Skip to content

Commit

Permalink
test case coverage 2
Browse files Browse the repository at this point in the history
  • Loading branch information
githubmamatha committed Jan 13, 2025
1 parent e625025 commit 41fbbca
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ void testSchoolReportPDFByMincode() throws Exception {
}

@Test
void testgetAmalgamatedSchoolReportPDFByMincode() throws Exception {
void testAmalgamatedSchoolReportPDFByMincode() throws Exception {

String mincode = "128385861";
String type = "TVRNONGRAD";
Expand All @@ -311,6 +311,19 @@ void testgetAmalgamatedSchoolReportPDFByMincode() throws Exception {
assertEquals(HttpStatus.NO_CONTENT, byteData.getStatusCode());
}

@Test
void testAmalgamatedSchoolReportPDFByMincode_NotFound() {

String mincode = "128385861";
String type = "TVRNONGRAD";
String schoolOfRecordId = "14453395-ecf0-7f81-998f-506940d94c2d";

when(this.restService.get(String.format(educGradStudentApiConstants.getStudentsForAmalgamatedReport(), schoolOfRecordId, type), List.class)).thenThrow(new RuntimeException());

ResponseEntity<byte[]> byteData = gradBusinessService.getSchoolReportPDFByMincode(mincode, type);
assertNotNull(byteData);
assertEquals(HttpStatus.NOT_FOUND, byteData.getStatusCode());
}
@Test
void testSchoolReportPDFByMincode_NotFound() {

Expand Down

0 comments on commit 41fbbca

Please sign in to comment.