Skip to content
Snippets Groups Projects
Commit 7dd48fb0 authored by sbobo3's avatar sbobo3
Browse files

[tests] Added edge case method to test if epidemic occurs when starting one...

[tests] Added edge case method to test if epidemic occurs when starting one day before date in testIsFluEpidemic() assertTrue test, and one day after date in testIsFluEpidemic() assertTrue test.
parent c0e07b62
No related branches found
No related tags found
1 merge request!18UC14 [S2]: Detect Flu Epidemic
...@@ -138,6 +138,14 @@ public class ViewDiagnosisStatisticsActionTest extends TestCase { ...@@ -138,6 +138,14 @@ public class ViewDiagnosisStatisticsActionTest extends TestCase {
assertTrue(action.isFluEpidemic("11/16/" + thisYear, "27606")); assertTrue(action.isFluEpidemic("11/16/" + thisYear, "27606"));
assertFalse(action.isFluEpidemic("11/09/" + 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(){ public void testGetEpidemicStatisticsInvalidThreshold(){
try{ try{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment