}
@Test
public void testSomeErrorConditions() {
try {
InitiateRegistration registration = new InitiateRegistration();
registration.setAuthResourceName("Yo mama");
registration.setEmailAddress(emailAddress1);
dispatch.execute(null, registration);
fail("This should have caused an error");
}
catch(Exception ex) {
//this is expected
}
try {
InitiateRegistration registration = new InitiateRegistration();
registration.setAuthResourceName(AuthServiceName.googleAccounts);
registration.setEmailAddress(null);
dispatch.execute(null, registration);
fail("This should have caused an error");
}
catch(Exception ex) {
//this is expected
}
try {
InitiateRegistration registration = new InitiateRegistration();
registration.setAuthResourceName(AuthServiceName.googleAccounts);
registration.setEmailAddress(emailAddress2);
dispatch.execute(null, registration);
fail("This should have caused an error");
}
catch(Exception ex) {