use of org.opennms.web.svclayer.support.DefaultDemandPollService in project opennms by OpenNMS.
the class DemandPollServiceTest method setUp.
@Override
protected void setUp() throws Exception {
m_demandPollDao = createMock(DemandPollDao.class);
m_monitoredServiceDao = createMock(MonitoredServiceDao.class);
m_pollerService = createMock(PollerService.class);
m_pollStore = new SingleDemandPollStore();
m_demandPollService = new DefaultDemandPollService();
m_demandPollService.setDemandPollDao(m_demandPollDao);
m_demandPollService.setPollerAPI(m_pollerService);
m_demandPollService.setMonitoredServiceDao(m_monitoredServiceDao);
}
use of org.opennms.web.svclayer.support.DefaultDemandPollService in project opennms by OpenNMS.
the class DefaultPollServiceIntegrationIT method testPollMonitoredService.
/**
* this is a feature that has not been written yet
*/
@Test
@Ignore
public void testPollMonitoredService() {
final PollerService api = createMock(PollerService.class);
((DefaultDemandPollService) m_demandPollService).setPollerAPI(api);
final DemandPoll poll = m_demandPollService.pollMonitoredService(1, addr("192.168.2.100"), 1, 1);
assertNotNull("DemandPoll should not be null", poll);
assertTrue("Polled service addr doesn't match...", poll.getId() >= 1);
}
Aggregations