use of org.opennms.netmgt.dao.jaxb.DefaultJavamailConfigurationDao in project opennms by OpenNMS.
the class EmailNorthbounderTest method setUp.
/**
* Sets up the test.
*
* @throws Exception the exception
*/
@Before
public void setUp() throws Exception {
MockLogAppender.setupLogging();
// Setup the Email northbounder configuration DAO
System.setProperty("opennms.home", "src/test/resources");
EmailNorthbounderConfigDao configDao = new EmailNorthbounderConfigDao();
configDao.setConfigResource(new FileSystemResource(new File("src/test/resources/etc/email-northbounder-config.xml")));
configDao.afterPropertiesSet();
// Setup JavaMail configuration DAO
DefaultJavamailConfigurationDao javaMailDao = new DefaultJavamailConfigurationDao();
javaMailDao.setConfigResource(new FileSystemResource(new File("src/test/resources/etc/javamail-configuration.xml")));
javaMailDao.afterPropertiesSet();
// Setup the trap northbounder (overriding the settings of the first sink to use the test trap receiver)
nbi = new EmailNorthbounder(configDao, javaMailDao, "google");
nbi.afterPropertiesSet();
}
Aggregations