Skip to content

Commit

Permalink
GRAD2-3032 - Fixes UT
Browse files Browse the repository at this point in the history
  • Loading branch information
mightycox committed Nov 12, 2024
1 parent b66776c commit 3d6b1f6
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,33 +181,6 @@ public void whenGetAllSchools_ReturnsListOfSchools() {
Mockito.verify(schoolServiceV2).getSchoolsFromRedisCache();
}

@Test
public void whenGetSchoolByMincode_ReturnsSchool() {
String mincode = "12345678";
ca.bc.gov.educ.api.trax.model.dto.institute.School school = new ca.bc.gov.educ.api.trax.model.dto.institute.School();
school.setSchoolId("1234567");
school.setDistrictId("9876543");
school.setMincode(mincode);

Mockito.when(schoolServiceV2.getSchoolByMinCodeFromRedisCache(mincode)).thenReturn(school);
schoolControllerV2.getSchoolByMincode(mincode);
Mockito.verify(schoolServiceV2).getSchoolByMinCodeFromRedisCache(mincode);
}

@Test
public void whenGetSchoolByMincode_Return_NOT_FOUND() {
String mincode = "12345678";
ca.bc.gov.educ.api.trax.model.dto.institute.School school = new ca.bc.gov.educ.api.trax.model.dto.institute.School();
school.setSchoolId("1234567");
school.setDistrictId("9876543");
school.setMincode(mincode);

Mockito.when(schoolServiceV2.getSchoolByMinCodeFromRedisCache(mincode)).thenReturn(null);
schoolControllerV2.getSchoolByMincode(mincode);
Mockito.verify(schoolServiceV2).getSchoolByMinCodeFromRedisCache(mincode);
assertEquals(responseHelper.NOT_FOUND(), schoolControllerV2.getSchoolByMincode(mincode));
}

@Test
public void whenGetAllSchoolDetails_ReturnsListOfSchoolDetails() {
final List<SchoolDetail> schoolDetails = new ArrayList<>();
Expand Down

0 comments on commit 3d6b1f6

Please sign in to comment.