use of org.opennms.netmgt.dao.jaxb.DefaultStatisticsDaemonConfigDao in project opennms by OpenNMS.
the class DefaultStatisticsDaemonConfigDaoTest method testAfterPropertiesSetWithGoodConfigFile.
public void testAfterPropertiesSetWithGoodConfigFile() throws Exception {
DefaultStatisticsDaemonConfigDao dao = new DefaultStatisticsDaemonConfigDao();
InputStream in = ConfigurationTestUtils.getInputStreamForConfigFile("statsd-configuration.xml");
dao.setConfigResource(new InputStreamResource(in));
dao.afterPropertiesSet();
}
use of org.opennms.netmgt.dao.jaxb.DefaultStatisticsDaemonConfigDao in project opennms by OpenNMS.
the class DefaultStatisticsDaemonConfigDaoTest method testGetReports.
public void testGetReports() throws Exception {
DefaultStatisticsDaemonConfigDao dao = new DefaultStatisticsDaemonConfigDao();
InputStream in = ConfigurationTestUtils.getInputStreamForConfigFile("statsd-configuration.xml");
dao.setConfigResource(new InputStreamResource(in));
dao.afterPropertiesSet();
List<Report> reports = dao.getReports();
assertNotNull("reports list should not be null", reports);
assertTrue("at least two reports should be present but found " + reports.size(), reports.size() > 1);
assertNotNull("first report should non-null", reports.get(0));
}
Aggregations