use of org.opennms.protocols.xml.dao.jaxb.XmlDataCollectionConfigDaoJaxb in project opennms by OpenNMS.
the class AbstractVTDXmlCollectorTest method setUp.
/**
* Sets the up.
*
* @throws Exception the exception
*/
@Before
public void setUp() throws Exception {
MockLogAppender.setupLogging();
m_rrdStrategy = new JRobinRrdStrategy();
m_resourceStorageDao = new FilesystemResourceStorageDao();
m_resourceStorageDao.setRrdDirectory(m_temporaryFolder.getRoot());
m_temporaryFolder.newFolder("snmp");
m_persisterFactory = new RrdPersisterFactory();
m_persisterFactory.setResourceStorageDao(m_resourceStorageDao);
m_persisterFactory.setRrdStrategy(m_rrdStrategy);
m_collectionAgent = new MockCollectionAgent(1, "mynode.local", InetAddrUtils.addr("127.0.0.1"));
m_eventProxy = EasyMock.createMock(EventProxy.class);
m_xmlCollectionDao = new XmlDataCollectionConfigDaoJaxb();
Resource resource = new FileSystemResource(getXmlConfigFileName());
m_xmlCollectionDao.setConfigResource(resource);
m_xmlCollectionDao.afterPropertiesSet();
MockDocumentBuilder.setXmlFileName(getXmlSampleFileName());
EasyMock.replay(m_eventProxy);
}
use of org.opennms.protocols.xml.dao.jaxb.XmlDataCollectionConfigDaoJaxb in project opennms by OpenNMS.
the class NodeLevelDataOnMultipleNodesTest method setUp.
/**
* Sets the up.
*
* @throws Exception the exception
*/
@Before
public void setUp() throws Exception {
MockLogAppender.setupLogging();
m_rrdStrategy = getRrdStrategy();
m_resourceStorageDao = new FilesystemResourceStorageDao();
m_resourceStorageDao.setRrdDirectory(m_temporaryFolder.getRoot());
m_temporaryFolder.newFolder("snmp");
m_persisterFactory = new RrdPersisterFactory();
m_persisterFactory.setResourceStorageDao(m_resourceStorageDao);
m_persisterFactory.setRrdStrategy(m_rrdStrategy);
m_eventProxy = EasyMock.createMock(EventProxy.class);
m_xmlCollectionDao = new XmlDataCollectionConfigDaoJaxb();
Resource resource = new FileSystemResource(getXmlConfigFileName());
m_xmlCollectionDao.setConfigResource(resource);
m_xmlCollectionDao.afterPropertiesSet();
m_collector = new XmlCollector();
m_collector.setXmlCollectionDao(m_xmlCollectionDao);
EasyMock.replay(m_eventProxy);
}
use of org.opennms.protocols.xml.dao.jaxb.XmlDataCollectionConfigDaoJaxb in project opennms by OpenNMS.
the class XmlCollectorITCase method setUp.
/**
* Sets the up.
*
* @throws Exception the exception
*/
@Before
public void setUp() throws Exception {
MockLogAppender.setupLogging();
initializeRrdStrategy();
initializeDocumentBuilder();
m_collectionAgent = new MockCollectionAgent(1, "mynode.local", InetAddrUtils.addr("127.0.0.1"));
m_eventProxy = EasyMock.createMock(EventProxy.class);
m_xmlCollectionDao = new XmlDataCollectionConfigDaoJaxb();
Resource resource = new FileSystemResource(getConfigFileName());
m_xmlCollectionDao.setConfigResource(resource);
m_xmlCollectionDao.afterPropertiesSet();
EasyMock.replay(m_eventProxy);
}
Aggregations