UC20 Data Access Object Completed
Compare changes
Files
1- sbobo3 authored
Added new FormValidationException to throw "no results returned" when database query results are empty.
Data Access Object for UC20 completed and can be found at: src/edu/ncsu/csc/itrust/dao/mysql/CauseOfDeathTrendsReportDAO.java
All JUnit tests pass with a code coverage of 91%. Test file can be found at: test/edu/ncsu/csc/itrust/unit/dao/deaths/CauseOfDeathTrendsReportTest.java
To test:
Repopulate the database, as dead patients are created specifically for testing:
java -cp "$(mvn -q dependency:build-classpath -Dmdep.outputFile=/dev/stdout)":target/classes:target/test-classes edu.ncsu.csc.itrust.unit.datagenerators.TestDataGenerator
Then run the unit test file:
mvn -Dtest=CauseOfDeathTrendsReportTest test
Output should be:
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0
Code coverage:
Added new FormValidationException to throw "no results returned" when database query results are empty.