Advertisement
Guest User

Untitled

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