Esempio n. 1
0
  /** @throws Exception */
  public void testNoMatchingSpecs() throws Exception {

    setupCollector("SNMP", false);
    expect(m_ipIfDao.findByServiceType("SNMP")).andReturn(new ArrayList<OnmsIpInterface>(0));
    setupTransactionManager();

    m_easyMockUtils.replayAll();

    m_collectd.afterPropertiesSet();

    m_collectd.start();

    m_scheduler.next();

    assertEquals(0, m_scheduler.getEntryCount());

    m_collectd.stop();

    m_easyMockUtils.verifyAll();
  }
Esempio n. 2
0
 private void setupInterface(OnmsIpInterface iface) {
   expect(m_ipIfDao.findByServiceType("SNMP")).andReturn(Collections.singletonList(iface));
   expect(m_ipIfDao.load(iface.getId())).andReturn(iface).atLeastOnce();
 }