Search in sources :

Example 16 with ResourceId

use of org.opennms.netmgt.model.ResourceId in project opennms by OpenNMS.

the class DefaultResourceDaoTest method testGetResourceNoNode.

@Test
public void testGetResourceNoNode() throws Exception {
    ResourceId resourceId = ResourceId.get("node", "1").resolve("nodeSnmp", "");
    expect(m_nodeDao.get("1")).andReturn(null);
    m_easyMockUtils.replayAll();
    m_resourceDao.getResourceById(resourceId);
    m_easyMockUtils.verifyAll();
}
Also used : ResourceId(org.opennms.netmgt.model.ResourceId) Test(org.junit.Test)

Aggregations

ResourceId (org.opennms.netmgt.model.ResourceId)16 OnmsResource (org.opennms.netmgt.model.OnmsResource)11 Date (java.util.Date)3 Test (org.junit.Test)3 Source (org.opennms.netmgt.measurements.model.Source)3 RrdGraphAttribute (org.opennms.netmgt.model.RrdGraphAttribute)3 File (java.io.File)2 HashMap (java.util.HashMap)2 List (java.util.List)2 ResourceDao (org.opennms.netmgt.dao.api.ResourceDao)2 FetchResults (org.opennms.netmgt.measurements.api.FetchResults)2 OnmsAttribute (org.opennms.netmgt.model.OnmsAttribute)2 OnmsResourceType (org.opennms.netmgt.model.OnmsResourceType)2 MissingParameterException (org.opennms.web.servlet.MissingParameterException)2 GraphResults (org.opennms.web.svclayer.model.GraphResults)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 Optional (com.google.common.base.Optional)1 Strings (com.google.common.base.Strings)1 Throwables (com.google.common.base.Throwables)1 Lists (com.google.common.collect.Lists)1