package org.pdxfinder.graph.dao;


import org.junit.Assert;
import org.junit.Test;


public class PatientSnapshotTest {

    @Test
    public void given_PatientSnapshot_when_PaediatricAge_then_AgeBinCorrect(){
        Patient patient = new Patient("test1", new Group());
        PatientSnapshot patientSnapshot1 = new PatientSnapshot(patient, "1", "", "", "");
        PatientSnapshot patientSnapshot2 = new PatientSnapshot(patient, "17mo", "", "", "");
        PatientSnapshot patientSnapshot3 = new PatientSnapshot(patient, "26mo", "", "", "");
        PatientSnapshot patientSnapshot4 = new PatientSnapshot(patient, "25", "", "", "");

        Assert.assertEquals(patientSnapshot1.getAgeBin(), "0-23 months");
        Assert.assertEquals(patientSnapshot2.getAgeBin(), "0-23 months");
        Assert.assertEquals(patientSnapshot3.getAgeBin(), "2-9");
        Assert.assertEquals(patientSnapshot4.getAgeBin(), "20-29");
    }

}

@@ -77,16 +77,43 @@
 .Test;%0A%0A
+import java.util.HashSet;%0A%0A
 %0Apublic 
@@ -291,16 +291,17 @@
 oup());%0A
+%0A
         
@@ -373,98 +373,923 @@
 1%22, 
-%22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot2 = new PatientSnapshot(patient, %2217mo
+new HashSet%3C%3E(), new TreatmentSummary());%0A        PatientSnapshot patientSnapshot2 = new PatientSnapshot(patient, %2217mo%22, new HashSet%3C%3E());%0A        patientSnapshot2.addSample(new Sample(%22sample123%22));%0A        PatientSnapshot patientSnapshot3 = new PatientSnapshot(patient, %2226mo%22, %22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot4 = new PatientSnapshot(patient, %225%22, %22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot5 = new PatientSnapshot(patient, %2215%22, %22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot6 = new PatientSnapshot(patient, %2225%22, %22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot7 = new PatientSnapshot(patient, %2235%22, %22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot8 = new PatientSnapshot(patient, %2245%22, %22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot9 = new PatientSnapshot(patient, %2255%22, %22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot10 = new PatientSnapshot(patient, %2265
 %22, %22
@@ -1331,33 +1331,34 @@
  patientSnapshot
-3
+11
  = new PatientSn
@@ -1366,36 +1366,126 @@
 pshot(patient, %22
-26mo
+75%22, %22%22, %22%22, %22%22);%0A        PatientSnapshot patientSnapshot12 = new PatientSnapshot(patient, %2285
 %22, %22%22, %22%22, %22%22);%0A
@@ -1515,33 +1515,34 @@
  patientSnapshot
-4
+13
  = new PatientSn
@@ -1550,33 +1550,33 @@
 pshot(patient, %22
-2
+9
 5%22, %22%22, %22%22, %22%22);
@@ -1573,24 +1573,25 @@
 , %22%22, %22%22);%0A%0A
+%0A
         Asse
@@ -1856,12 +1856,624 @@
 , %222
-0-29
+-9%22);%0A        Assert.assertEquals(patientSnapshot5.getAgeBin(), %2210-19%22);%0A        Assert.assertEquals(patientSnapshot6.getAgeBin(), %2220-29%22);%0A        Assert.assertEquals(patientSnapshot7.getAgeBin(), %2230-39%22);%0A        Assert.assertEquals(patientSnapshot8.getAgeBin(), %2240-49%22);%0A        Assert.assertEquals(patientSnapshot9.getAgeBin(), %2250-59%22);%0A        Assert.assertEquals(patientSnapshot10.getAgeBin(), %2260-69%22);%0A        Assert.assertEquals(patientSnapshot11.getAgeBin(), %2270-79%22);%0A        Assert.assertEquals(patientSnapshot12.getAgeBin(), %2280-89%22);%0A        Assert.assertEquals(patientSnapshot13.getAgeBin(), %2290+
 %22);%0A

Extend age tests