Exemplo n.º 1
0
  @Test
  public void testGetPatient() {
    PatientBean bean1 = null;
    try {
      bean1 = action.getPatient("2");
    } catch (ITrustException e) {
      fail();
    }
    if (bean1 == null) fail();
    assertEquals(bean1.getMID(), 2L); // and just test that the right record came back

    PatientBean bean2 = null;
    try {
      bean2 = action.getPatient("1");
    } catch (ITrustException e) {
      assertNull(bean2);
    }

    PatientBean bean3 = null;
    try {
      bean3 = action.getPatient("a");
    } catch (ITrustException e) {
      assertNull(bean3);
    }
  }
Exemplo n.º 2
0
 @Test
 public void testGetViewablePatients() {
   List<PatientBean> list = null;
   try {
     list = action.getViewablePatients();
   } catch (ITrustException e) {
     fail();
   }
   if (list == null) {
     fail();
   } else {
     assertEquals(1, list.size());
   }
 }