Skip to content
Snippets Groups Projects
Commit b5b655f2 authored by adityab3's avatar adityab3
Browse files

Added test case for duplicate email

parent e8add254
No related branches found
No related tags found
1 merge request!4Uc91.2
...@@ -95,4 +95,35 @@ public class AddPreRegisterPatientActionTest extends TestCase { ...@@ -95,4 +95,35 @@ public class AddPreRegisterPatientActionTest extends TestCase {
} }
} }
/**
* Ensure that duplicate emails are not allowed
*/
public void testPreRegisterPatientDuplicateEmail() throws Exception {
PatientBean p2 = new PatientBean();
p2.setFirstName("Jiminy");
p2.setLastName("Cricket");
p2.setEmail("make.awish@gmail.com");
p2.setPassword("password");
action.addPatient(p2);
PatientBean p3 = new PatientBean();
p3.setFirstName("Make");
p3.setLastName("AWish");
p3.setEmail("make.awish@gmail.com");
p3.setPassword("password");
try {
action.addPatient(p3);
fail("Duplicate email");
} catch (ITrustException e) { }
}
/**
* Check that invalid names are not allowed
*/
public void testPreRegisterPatientInvalidName() throws Exception {
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment