コード例 #1
0
 public void testFilterByProcedure() throws Exception {
   filter = new PersonnelReportFilter(PersonnelReportFilterType.DLHCP, "Beaker Beaker", factory);
   List<PatientBean> res = filter.filter(allPatients);
   assertEquals(2, res.size());
   assertTrue(res.get(0).getMID() == 22L);
   assertTrue(res.get(1).getMID() == 23L);
 }
コード例 #2
0
 public void testGetFilterValue() {
   filter = new PersonnelReportFilter(PersonnelReportFilterType.DLHCP, "city!", factory);
   String expected = "city!";
   assertEquals(expected, filter.getFilterValue());
 }
コード例 #3
0
 public void testFilterTypeFromString() {
   PersonnelReportFilterType expected = PersonnelReportFilterType.DLHCP;
   PersonnelReportFilterType actual = PersonnelReportFilter.filterTypeFromString("dLhCP");
   assertEquals(expected, actual);
 }
コード例 #4
0
 public void testToString() {
   String expected = "";
   filter = new PersonnelReportFilter(PersonnelReportFilterType.DLHCP, "val", factory);
   expected = "Filter by DECLARED HCP with value val";
   assertEquals(expected, filter.toString());
 }
コード例 #5
0
 public void testFilterByProcedureNoResult() {
   filter = new PersonnelReportFilter(PersonnelReportFilterType.DLHCP, "Dalpe", factory);
   List<PatientBean> res = filter.filter(allPatients);
   assertTrue(res.isEmpty());
 }