use of org.opennms.netmgt.dao.mock.MockEventIpcManager in project opennms by OpenNMS.
the class AMQPEventReceiverBlueprintTest method addServicesOnStartup.
@SuppressWarnings("rawtypes")
@Override
protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
MockEventIpcManager mockEventIpcManager = new MockEventIpcManager();
services.put(EventIpcManager.class.getName(), asService(mockEventIpcManager, null));
MockNodeDao mockNodeDao = new MockNodeDao();
services.put(NodeDao.class.getName(), asService(mockNodeDao, null));
}
use of org.opennms.netmgt.dao.mock.MockEventIpcManager in project opennms by OpenNMS.
the class AMQPEventForwarderBlueprintTest method addServicesOnStartup.
@SuppressWarnings("rawtypes")
@Override
protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
MockEventIpcManager mockEventIpcManager = new MockEventIpcManager();
services.put(EventIpcManager.class.getName(), asService(mockEventIpcManager, null));
MockNodeDao mockNodeDao = new MockNodeDao();
services.put(NodeDao.class.getName(), asService(mockNodeDao, null));
}
use of org.opennms.netmgt.dao.mock.MockEventIpcManager in project opennms by OpenNMS.
the class EifAdapterBlueprintTest method addServicesOnStartup.
@SuppressWarnings("rawtypes")
@Override
protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
MockEventIpcManager mockEventIpcManager = new MockEventIpcManager();
MockNodeDao mockNodeDao = new MockNodeDao();
services.put(EventIpcManager.class.getName(), asService(mockEventIpcManager, null));
services.put(NodeDao.class.getName(), asService(mockNodeDao, null));
}
use of org.opennms.netmgt.dao.mock.MockEventIpcManager in project opennms by OpenNMS.
the class BroadcastEventProcessorTest method testReloadDaemonConfig.
public void testReloadDaemonConfig() {
MockEventIpcManager eventIpcManager = new MockEventIpcManager();
BroadcastEventProcessor processor = new BroadcastEventProcessor(eventIpcManager, m_eventConfDao);
EventBuilder eventBuilder = new EventBuilder(EventConstants.RELOAD_DAEMON_CONFIG_UEI, "dunno");
eventBuilder.addParam(EventConstants.PARM_DAEMON_NAME, "Eventd");
// Expect a call to reload the EventConfDao
m_eventConfDao.reload();
m_mocks.replayAll();
processor.onEvent(eventBuilder.getEvent());
m_mocks.verifyAll();
}
use of org.opennms.netmgt.dao.mock.MockEventIpcManager in project opennms by OpenNMS.
the class BroadcastEventProcessorTest method testInstantiateWithNullEventConfDao.
public void testInstantiateWithNullEventConfDao() {
ThrowableAnticipator ta = new ThrowableAnticipator();
ta.anticipate(new IllegalArgumentException("argument eventConfDao must not be null"));
try {
new BroadcastEventProcessor(new MockEventIpcManager(), null);
} catch (Throwable t) {
ta.throwableReceived(t);
}
ta.verifyAnticipated();
}
Aggregations