Skip to content

Commit

Permalink
More UT
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Jan 11, 2024
1 parent c63284e commit 23cd785
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@ void testGetPenMatchResultFoundPENExceptionOccurred() {
assertThrows(StudentDataCollectionAPIRuntimeException.class, () -> validationRulesService.updatePenMatchAndGradStatusColumns(mockStudentEntity, "123456789"));
}

@Test
void testGetPenMatchResultFoundPENExceptionOccurredParseDate() {
SdcSchoolCollectionStudentEntity mockStudentEntity = new SdcSchoolCollectionStudentEntity();
PenMatchResult penMatchResult = getPenMatchResult();
when(this.restUtils.getPenMatchResult(any(),any(), anyString())).thenReturn(penMatchResult);
GradStatusResult gradStatusResult = getGradStatusResult();
gradStatusResult.setProgramCompletionDate("10-10-2011");
when(this.restUtils.getGradStatusResult(any(),any())).thenReturn(gradStatusResult);
SdcSchoolCollectionEntity schoolCollectionEntity = new SdcSchoolCollectionEntity();
CollectionEntity collectionEntity = new CollectionEntity();
collectionEntity.setSnapshotDate(LocalDate.now());
schoolCollectionEntity.setCollectionEntity(collectionEntity);
mockStudentEntity.setSdcSchoolCollection(schoolCollectionEntity);

assertThrows(StudentDataCollectionAPIRuntimeException.class, () -> validationRulesService.updatePenMatchAndGradStatusColumns(mockStudentEntity, "123456789"));
}

@Test
void testGetPenMatchResultFoundPENGradNotFound() {
SdcSchoolCollectionStudentEntity mockStudentEntity = new SdcSchoolCollectionStudentEntity();
Expand Down

0 comments on commit 23cd785

Please sign in to comment.