Advertisement
Guest User

Untitled

a guest
Apr 8th, 2013
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package org.openmrs.api;
  2.  
  3. import static junit.framework.Assert.assertEquals;
  4. import static junit.framework.Assert.assertTrue;
  5. import static org.junit.Assert.*;
  6. import junit.framework.Assert;
  7.  
  8. import org.junit.Test;
  9. import org.openmrs.Obs;
  10. import org.openmrs.api.context.Context;
  11. import org.openmrs.api.db.NoteDAO;
  12. import org.openmrs.notification.Note;
  13. import org.openmrs.notification.NoteService;
  14. import org.openmrs.test.Verifies;
  15.  
  16. public class NoteServiceTest {
  17.  
  18. @Test
  19. @Verifies(value = "should void the Note and set the voidReason", method = "voidNote(Note,String)")
  20. public void voidNote_shouldVoidTheNoteAndSetTheVoidReason() throws Exception {
  21. NoteService noteService = Context.getNoteService();
  22.  
  23. Note note = noteService.getNote(1);
  24.  
  25. noteService.voidNote(note, "testing void function");
  26. assertTrue(note.getVoided());
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement