Skip to content

Commit

Permalink
Merge pull request #251 from bcgov/grad-release
Browse files Browse the repository at this point in the history
Grad release 1.16.0
  • Loading branch information
githubmamatha authored Mar 26, 2024
2 parents 6f61c74 + 2939c54 commit e567528
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ca.bc.gov.educ</groupId>
<artifactId>educ-grad-graduation-report-api</artifactId>
<version>1.8.44</version>
<version>1.8.45</version>
<name>educ-grad-graduation-report-api</name>
<description>Grad Graduation Report API for GRAD team</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public ResponseEntity<List<GradStudentReports>> getAllStudentReportsList(@PathVa
@ApiResponses(value = {@ApiResponse(responseCode = "204", description = "NO_CONTENT")})
public ResponseEntity<Void> deleteAllStudentAchievements(@PathVariable String studentID) {
logger.debug("deleteAllStudentAchievements : ");
return response.DELETE(commonService.getAllStudentAchievement(UUID.fromString(studentID)));
return response.DELETE(commonService.deleteAllStudentAchievement(UUID.fromString(studentID)));
}

@GetMapping(EducGradReportApiConstants.STUDENT_CERTIFICATE_BY_DIST_DATE_N_STATUS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public int archiveAllStudentAchievements(UUID studentID) {
}

@Transactional
public int getAllStudentAchievement(UUID studentID) {
public int deleteAllStudentAchievement(UUID studentID) {
List<GradStudentReportsEntity> repList = gradStudentReportsRepository.findByStudentIDAndDocumentStatusCodeNot(studentID, "ARCH");
boolean hasDocuments = false;
if (!repList.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void testGetAllStudentReportList() {
public void testDeleteAllStudentAchievements() {
UUID studentID = new UUID(1, 1);
int returnValue = 1;
Mockito.when(commonService.getAllStudentAchievement(studentID)).thenReturn(returnValue);
Mockito.when(commonService.deleteAllStudentAchievement(studentID)).thenReturn(returnValue);
commonController.deleteAllStudentAchievements(studentID.toString());
assertEquals(1,returnValue);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,12 @@ public void testGetAllStudentAchievement() {

Mockito.when(gradStudentReportsRepository.findByStudentIDAndDocumentStatusCodeNot(studentID,"ARCH")).thenReturn(gradStudentReportsList);
Mockito.when(gradStudentCertificatesRepository.findByStudentIDAndDocumentStatusCodeNot(studentID,"ARCH")).thenReturn(gradStudentCertificatesList);
int res = commonService.getAllStudentAchievement(studentID);
int res = commonService.deleteAllStudentAchievement(studentID);
assertThat(res).isEqualTo(1);

Mockito.when(gradStudentReportsRepository.findByStudentIDAndDocumentStatusCodeNot(studentID,"ARCH")).thenReturn(List.of());
Mockito.when(gradStudentCertificatesRepository.findByStudentIDAndDocumentStatusCodeNot(studentID,"ARCH")).thenReturn(List.of());
res = commonService.getAllStudentAchievement(studentID);
res = commonService.deleteAllStudentAchievement(studentID);
assertThat(res).isZero();
}

Expand Down

0 comments on commit e567528

Please sign in to comment.