use of com.hack23.cia.service.api.action.admin.SendEmailRequest in project cia by Hack23.
the class SendEmailServiceITest method sendEmailInvalidEmailFailureTest.
/**
* Send email invalid email failure test.
*
* @throws Exception
* the exception
*/
@Test
public void sendEmailInvalidEmailFailureTest() throws Exception {
final CreateApplicationSessionRequest createSessionRequest = createTestApplicationSession();
final SendEmailRequest serviceRequest = new SendEmailRequest();
serviceRequest.setSessionId(createSessionRequest.getSessionId());
serviceRequest.setEmail("novalidemail$###hack23.com");
serviceRequest.setSubject("Test Email SendEmailServiceITest");
serviceRequest.setContent("Test content");
final SendEmailResponse response = (SendEmailResponse) applicationManager.service(serviceRequest);
assertNotNull(EXPECT_A_RESULT, response);
assertEquals(ServiceResult.FAILURE, response.getResult());
assertEquals("email must be a well-formed email address", response.getErrorMessage());
}
Aggregations