Skip to content

Commit dda9444

Browse files
committed
Update RulesProcessorTest.java
1 parent b7ffac3 commit dda9444

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

api/src/test/java/ca/bc/gov/educ/studentdatacollection/api/rules/RulesProcessorTest.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -467,39 +467,6 @@ void testDuplicatePenRule() {
467467
assertThat(validationDigitError.get(0).getValidationIssueCode()).isEqualTo("PENCHECKDIGITERR");
468468
}
469469

470-
@Test
471-
void testDuplicatePenRuleFound() {
472-
var collection = collectionRepository.save(createMockCollectionEntity());
473-
var sdcSchoolCollectionEntity = sdcSchoolCollectionRepository.save(createMockSdcSchoolCollectionEntity(collection, null));
474-
val entity = createMockSchoolStudentEntity(sdcSchoolCollectionEntity);
475-
entity.setEnrolledGradeCode("08");
476-
entity.setStudentPen("120164447");
477-
entity.setCreateDate(LocalDateTime.now().minusMinutes(14));
478-
entity.setUpdateDate(LocalDateTime.now());
479-
entity.setCreateUser(ApplicationProperties.STUDENT_DATA_COLLECTION_API);
480-
entity.setUpdateUser(ApplicationProperties.STUDENT_DATA_COLLECTION_API);
481-
482-
val entity2 = createMockSchoolStudentEntity(sdcSchoolCollectionEntity);
483-
entity2.setStudentPen("120164447");
484-
entity2.setCreateDate(LocalDateTime.now().minusMinutes(14));
485-
entity2.setUpdateDate(LocalDateTime.now());
486-
entity2.setCreateUser(ApplicationProperties.STUDENT_DATA_COLLECTION_API);
487-
entity2.setUpdateUser(ApplicationProperties.STUDENT_DATA_COLLECTION_API);
488-
sdcSchoolCollectionStudentRepository.save(entity2);
489-
490-
val savedEntityTwo = sdcSchoolCollectionStudentRepository.findById(entity2.getSdcSchoolCollectionStudentID());
491-
assertThat(savedEntityTwo).isPresent();
492-
493-
val dupePenCount = sdcSchoolCollectionStudentRepository.countForDuplicateStudentPENs(entity.getSdcSchoolCollection().getSdcSchoolCollectionID(), entity.getStudentPen());
494-
assertThat(dupePenCount).isEqualTo(1);
495-
496-
entity.setStudentPen("120164447");
497-
PenMatchResult penMatchResult = getPenMatchResult();
498-
when(this.restUtils.getPenMatchResult(any(),any(), anyString())).thenReturn(penMatchResult);
499-
val validationErrorDupe = rulesProcessor.processRules(createMockStudentRuleData(entity, createMockSchool()));
500-
assertThat(validationErrorDupe.size()).isNotZero();
501-
}
502-
503470
@Test
504471
void testHomeSchoolRule() {
505472
var collection = collectionRepository.save(createMockCollectionEntity());

0 commit comments

Comments
 (0)