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();
}
Aggregations