use of com.emc.vipr.model.sys.eventhandler.ConnectEmcEmail in project coprhd-controller by CoprHD.
the class ConfigServiceTest method testEmailUsingNoAuth.
@Test
public void testEmailUsingNoAuth() {
ConnectEmcEmail email = new ConnectEmcEmail();
email.setEmailSender("DONOTREPLY@customer.com");
email.setEmailServer("mailhub.lss.emc.com");
email.setNotifyEmailAddress("joe.customer@customer.com");
email.setPrimaryEmailAddress("emailalertesg@emc.com");
email.setSafeEncryption("no");
email.setStartTls("no");
PropertyInfoUpdate propInfo = ConfigService.ConfigureConnectEmc.configureEmail(email);
Assert.assertEquals(propInfo.getProperty("system_connectemc_smtp_server"), email.getEmailServer());
Assert.assertEquals(propInfo.getProperty("system_connectemc_smtp_emcto"), email.getPrimaryEmailAddress());
Assert.assertEquals(propInfo.getProperty("system_connectemc_smtp_from"), email.getEmailSender());
Assert.assertEquals(propInfo.getProperty("system_connectemc_smtp_to"), email.getNotifyEmailAddress());
Assert.assertEquals(propInfo.getProperty("system_connectemc_smtp_enabletls"), email.getStartTls());
Assert.assertEquals(propInfo.getProperty("system_connectemc_encrypt"), email.getSafeEncryption());
Assert.assertNull(propInfo.getProperty("system_connectemc_smtp_authtype"));
Assert.assertNull(propInfo.getProperty("system_connectemc_smtp_username"));
Assert.assertNull(propInfo.getProperty("system_connectemc_smtp_password"));
}
Aggregations