Esempio n. 1
0
 @Test
 public void testIsValidCondition_blankPatientID() {
   LookupPatient frm = new LookupPatient();
   frm.getRbPatientID().setSelected(true);
   frm.getTxtPatientID().setText("");
   Assert.assertEquals("You must put patient ID", frm.checkValidFields());
 }
Esempio n. 2
0
 @Test
 public void testIsValidCondition_numberPatientID() {
   LookupPatient frm = new LookupPatient();
   frm.getRbPatientID().setSelected(true);
   frm.getTxtPatientID().setText("123");
   Assert.assertEquals("True", frm.checkValidFields());
 }
Esempio n. 3
0
 @Test
 public void testIsValidCondition_stringNameID() {
   LookupPatient frm = new LookupPatient();
   frm.getRbPatientName().setSelected(true);
   frm.getTxtPatientName().setText("nhphat");
   Assert.assertEquals("True", frm.checkValidFields());
 }
Esempio n. 4
0
 @Test
 public void testIsValidCondition_stringPatientID() {
   LookupPatient frm = new LookupPatient();
   frm.getRbPatientID().setSelected(true);
   frm.getTxtPatientID().setText("abc");
   Assert.assertEquals(
       "Patient ID does not accept character, only 0-9 is acceptable", frm.checkValidFields());
 }