// Path: src/main/java/org/motechproject/ws/rct/PregnancyTrimester.java
// public enum PregnancyTrimester {
//   NONE, FIRST , SECOND , THIRD
// }


import org.junit.Test;
import org.motechproject.ws.rct.PregnancyTrimester;
import java.util.Calendar;
import java.util.Date;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
package org.motechproject.ws;




public class PatientTest {

    @Test
    public void shouldDetermineIfPatientHasRegisteredPregnancy(){
        Patient patient = new Patient();
        assertFalse(patient.isPregnancyRegistered());
        Patient pregnantPatient = new Patient();
        pregnantPatient.setEstimateDueDate(new Date());
        assertTrue(pregnantPatient.isPregnancyRegistered());

    }

    @Test
    public void shouldDetermineTrimesterAsSecond(){
        Patient patient = new Patient();
        Calendar instance = Calendar.getInstance();
        instance.add(Calendar.MONTH,5);
        patient.setEstimateDueDate(instance.getTime());
        assertTrue(patient.isPregnancyRegistered());
// Path: src/main/java/org/motechproject/ws/rct/PregnancyTrimester.java
// public enum PregnancyTrimester {
//   NONE, FIRST , SECOND , THIRD
// }


// Path: src/test/java/org/motechproject/ws/PatientTest.java
import org.junit.Test;
import org.motechproject.ws.rct.PregnancyTrimester;
import java.util.Calendar;
import java.util.Date;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

package org.motechproject.ws;




public class PatientTest {

    @Test
    public void shouldDetermineIfPatientHasRegisteredPregnancy(){
        Patient patient = new Patient();
        assertFalse(patient.isPregnancyRegistered());
        Patient pregnantPatient = new Patient();
        pregnantPatient.setEstimateDueDate(new Date());
        assertTrue(pregnantPatient.isPregnancyRegistered());

    }

    @Test
    public void shouldDetermineTrimesterAsSecond(){
        Patient patient = new Patient();
        Calendar instance = Calendar.getInstance();
        instance.add(Calendar.MONTH,5);
        patient.setEstimateDueDate(instance.getTime());
        assertTrue(patient.isPregnancyRegistered());
        assertTrue(PregnancyTrimester.SECOND.equals(patient.pregnancyTrimester()));