Skip to content

Commit

Permalink
Test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
arybakov-cgi committed Nov 9, 2023
1 parent a6b9e6b commit 83e15f6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public void createSchoolDistributionReportException() throws Exception {
LOG.debug("<{}.createSchoolDistributionReportException at {}", CLASS_NAME, dateFormat.format(new Date()));
ReportRequest reportRequest = createReportRequest("json/schoolDistributionReportRequest.json");

assertNotNull(reportRequest);
reportRequest.setData(null);

apiReportService.getSchoolDistributionReport(reportRequest);
Expand Down Expand Up @@ -131,7 +130,6 @@ public void createDistrictDistributionYearEndReportException() throws Exception
LOG.debug("<{}.createDistrictDistributionYearEndReport at {}", CLASS_NAME, dateFormat.format(new Date()));
ReportRequest reportRequest = createReportRequest("json/districtDistributionYearEndReportRequest.json");

assertNotNull(reportRequest);
reportRequest.setData(null);

apiReportService.getDistrictDistributionReportYearEnd(reportRequest);
Expand Down Expand Up @@ -178,7 +176,6 @@ public void createDistrictDistributionYearEndNonGradReportException() throws Exc
LOG.debug("<{}.createDistrictDistributionYearEndNonGradReportException at {}", CLASS_NAME, dateFormat.format(new Date()));
ReportRequest reportRequest = createReportRequest("json/districtDistributionYearEndNonGradReportRequest.json");

assertNotNull(reportRequest);
reportRequest.setData(null);

apiReportService.getDistrictDistributionReportYearEndNonGrad(reportRequest);
Expand Down Expand Up @@ -301,7 +298,6 @@ public void createSchoolLabelReportException() throws Exception {
LOG.debug("<{}.createSchoolLabelReportException at {}", CLASS_NAME, dateFormat.format(new Date()));
ReportRequest reportRequest = createReportRequest("json/schoolLabelReportRequest.json");

assertNotNull(reportRequest);
reportRequest.setData(null);

apiReportService.getSchoolLabelReport(reportRequest);
Expand Down Expand Up @@ -341,7 +337,6 @@ public void createSchoolGraduationReportException() throws Exception {
LOG.debug("<{}.createSchoolGraduationReportException at {}", CLASS_NAME, dateFormat.format(new Date()));
ReportRequest reportRequest = createReportRequest("json/schoolGraduationReportRequest.json");

assertNotNull(reportRequest);
reportRequest.setData(null);

apiReportService.getSchoolGraduationReport(reportRequest);
Expand Down Expand Up @@ -402,7 +397,6 @@ public void createSchoolNonGraduationReportException() throws Exception {
LOG.debug("<{}.createSchoolNonGraduationReportException at {}", CLASS_NAME, dateFormat.format(new Date()));
ReportRequest reportRequest = createReportRequest("json/schoolNonGraduationReportRequest.json");

assertNotNull(reportRequest);
reportRequest.setData(null);

apiReportService.getSchoolNonGraduationReport(reportRequest);
Expand Down Expand Up @@ -457,7 +451,6 @@ public void createStudentNonGradReportException() throws Exception {
LOG.debug("<{}.createStudentNonGradReportException at {}", CLASS_NAME, dateFormat.format(new Date()));
ReportRequest reportRequest = createReportRequest("json/studentNonGradReportRequest.json");

assertNotNull(reportRequest);
reportRequest.setData(null);

apiReportService.getStudentNonGradReport(reportRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ public void createStudentAchievementReportException() throws Exception {
LOG.debug("<{}.createStudentAchievementReportException at {}", CLASS_NAME, dateFormat.format(new Date()));
ReportRequest reportRequest = createReportRequest("json/studentAchievementReportRequest.json");

assertNotNull(reportRequest);
assertNotNull(reportRequest.getData());

reportRequest.getData().setAccessToken("accessToken");

mockTraxSchool(adaptTraxSchool(getReportDataSchool(reportRequest.getData())));
Expand All @@ -96,10 +93,6 @@ public void createStudentAchievementReportException() throws Exception {
String pen = reportRequest.getData().getStudent().getPen().getPen();
reportRequest.getOptions().setReportFile(String.format(reportRequest.getOptions().getReportFile(), pen));

GraduationStudentRecord graduationStudentRecord = mockGraduationStudentRecord(pen, mockGradSearchStudent(pen).getStudentID());
assertNotNull(graduationStudentRecord);
assertNotNull(graduationStudentRecord.getLastUpdateDate());

when(apiReportService.getStudentAchievementReportDocument(reportRequest)).thenThrow(new ReportApiServiceException(String.format("Unable to retrieve %s", "getStudentAchievementReport(ReportRequest reportRequest)"), new Exception()));
apiReportService.getStudentAchievementReport(reportRequest);
LOG.debug(">createStudentAchievementReportException");
Expand Down Expand Up @@ -451,20 +444,13 @@ public void createXmlTranscriptReportException() throws Exception {
LOG.debug("<{}.createXmlTranscriptReportException at {}", CLASS_NAME, dateFormat.format(new Date()));
XmlReportRequest reportRequest = createXmlReportRequest("json/xmlTranscriptReportRequest.json");

assertNotNull(reportRequest);
assertNotNull(reportRequest.getData());

reportRequest.getData().setAccessToken("accessToken");

ReportRequestDataThreadLocal.setXmlReportData(reportRequest.getData());

String pen = reportRequest.getData().getPen().getPen();
reportRequest.getOptions().setReportFile(String.format(reportRequest.getOptions().getReportFile(), pen));

GraduationStudentRecord graduationStudentRecord = mockGraduationStudentRecord(pen, mockGradSearchStudent(pen).getStudentID());
assertNotNull(graduationStudentRecord);
assertNotNull(graduationStudentRecord.getLastUpdateDate());

when(apiReportService.getStudentXmlTranscriptReportDocument(reportRequest)).thenThrow(new ReportApiServiceException(String.format("Unable to retrieve %s", "getStudentXmlTranscriptReport(XmlReportRequest reportRequest)"), new Exception()));
apiReportService.getStudentXmlTranscriptReport(reportRequest);

Expand Down

0 comments on commit 83e15f6

Please sign in to comment.