Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void shouldCreateAnEncounterWithDifferentTimezone() throws Exception {
- int before = Context.getEncounterService().getAllEncounters(null).size();
- Calendar calendar = new GregorianCalendar();
- calendar.add(Calendar.DAY_OF_YEAR, 1);
- Date tomorrowDate = calendar.getTime();
- SimpleObject post = new SimpleObject().add("location", "9356400c-a5a2-4532-8f2b-2361b3446eb8").add("encounterType",
- "61ae96f4-6afe-4351-b6f8-cd4fc383cce1").add("encounterDatetime", tomorrowDate.toString()).add("patient",
- "da7f524f-27ce-4bb2-86d6-6d1d05312bd5").add("provider", "ba1b19c2-3ed6-4f63-b8c0-f762dc8d7562");
- SimpleObject newEncounter = (SimpleObject) new EncounterController().create(post, emptyRequest(),
- new MockHttpServletResponse());
- Assert.assertNotNull(newEncounter);
- Assert.assertEquals(before, Context.getEncounterService().getAllEncounters(null).size());
- Util.log("created encounter with new timestamp", newEncounter);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement