private void initializeRequest() { request = new PatientEventRequest(); request.setEventName("eventName"); request.setNewValue("value"); request.setPerformedBy("user"); request.setPatientDocumentId("patientDocId"); request.setDateTime(DateTime.now().toDate()); }
@Test public void shouldMapNewValue() { PatientEvent event = patientEventRequestMapper.map(); assertEquals(request.getNewValue(), event.getNewValue()); request.setNewValue(null); event = patientEventRequestMapper.map(); assertEquals("", event.getNewValue()); }
@Test public void shouldMapPerformedBy() { PatientEvent event = patientEventRequestMapper.map(); assertEquals(request.getPerformedBy(), event.getPerformedBy()); request.setPerformedBy(""); event = patientEventRequestMapper.map(); assertEquals("", event.getPerformedBy()); }
@Test public void shouldMapDateTime() { PatientEvent event = patientEventRequestMapper.map(); assertEquals(request.getDateTime(), event.getDateTime()); }
@Test public void shouldMapPatientDocumentId() { PatientEvent event = patientEventRequestMapper.map(); assertEquals(request.getPatientDocumentId(), event.getPatientDocumentId()); }