Search in sources :

Example 1 with XmlDataCollectionConfigDao

use of org.opennms.protocols.xml.dao.XmlDataCollectionConfigDao in project opennms by OpenNMS.

the class XmlCollectorComplianceTest method getRequiredBeans.

public Map<String, Object> getRequiredBeans() {
    XmlDataCollectionConfig config = mock(XmlDataCollectionConfig.class);
    when(config.getRrdRepository()).thenReturn("target");
    when(config.buildRrdRepository(COLLECTION)).thenReturn(new RrdRepository());
    XmlRrd xmlRrd = new XmlRrd();
    xmlRrd.setStep(300);
    XmlDataCollection collection = new XmlDataCollection();
    collection.setXmlRrd(xmlRrd);
    XmlDataCollectionConfigDao xmlDataCollectionConfigDao = mock(XmlDataCollectionConfigDao.class);
    when(xmlDataCollectionConfigDao.getDataCollectionByName(COLLECTION)).thenReturn(collection);
    when(xmlDataCollectionConfigDao.getConfig()).thenReturn(config);
    return new ImmutableMap.Builder<String, Object>().put("xmlDataCollectionConfigDao", xmlDataCollectionConfigDao).build();
}
Also used : XmlRrd(org.opennms.protocols.xml.config.XmlRrd) XmlDataCollection(org.opennms.protocols.xml.config.XmlDataCollection) XmlDataCollectionConfig(org.opennms.protocols.xml.config.XmlDataCollectionConfig) XmlDataCollectionConfigDao(org.opennms.protocols.xml.dao.XmlDataCollectionConfigDao) RrdRepository(org.opennms.netmgt.rrd.RrdRepository)

Aggregations

RrdRepository (org.opennms.netmgt.rrd.RrdRepository)1 XmlDataCollection (org.opennms.protocols.xml.config.XmlDataCollection)1 XmlDataCollectionConfig (org.opennms.protocols.xml.config.XmlDataCollectionConfig)1 XmlRrd (org.opennms.protocols.xml.config.XmlRrd)1 XmlDataCollectionConfigDao (org.opennms.protocols.xml.dao.XmlDataCollectionConfigDao)1