diff --git a/iTrust/test/edu/ncsu/csc/itrust/unit/action/ViewDiagnosisStatisticsActionTest.java b/iTrust/test/edu/ncsu/csc/itrust/unit/action/ViewDiagnosisStatisticsActionTest.java index 147c5b67f95ad00f9dfc087645acc0e5b26b8cf7..2c58f1ad5da12d308912c6e8a57d1a70d4e4f363 100644 --- a/iTrust/test/edu/ncsu/csc/itrust/unit/action/ViewDiagnosisStatisticsActionTest.java +++ b/iTrust/test/edu/ncsu/csc/itrust/unit/action/ViewDiagnosisStatisticsActionTest.java @@ -138,6 +138,14 @@ public class ViewDiagnosisStatisticsActionTest extends TestCase { assertTrue(action.isFluEpidemic("11/16/" + thisYear, "27606")); assertFalse(action.isFluEpidemic("11/09/" + thisYear, "27606")); } + + public void testIsFluEpidemicEdge() throws Exception { + gen.influenza_epidemic(); + // Test should pass since previous 14 days will have enough cases for epidemic + assertTrue(action.isFluEpidemic("11/15/" + thisYear, "27606")); + // Test should fail since previous 14 days will not have enough cases for epidemic + assertFalse(action.isFluEpidemic("11/17/" + thisYear, "27606")); + } public void testGetEpidemicStatisticsInvalidThreshold(){ try{