Search in sources :

Example 1 with CollectionResourceDTO

use of org.opennms.netmgt.collection.dto.CollectionResourceDTO in project opennms by OpenNMS.

the class CollectionResourceDTOTest method data.

@Parameters
public static Collection<Object[]> data() throws ParseException {
    NodeLevelResource nodeLevelResource = new NodeLevelResource(1);
    NumericAttribute attribute = new NumericAttribute("group-x", "cores", 1, AttributeType.GAUGE, "some-oid");
    CollectionResourceDTO dto = new CollectionResourceDTO();
    dto.setResource(nodeLevelResource);
    dto.getAttributes().add(attribute);
    return Arrays.asList(new Object[][] { { dto, "<collection-resource>\n" + "   <node-level-resource node-id=\"1\"/>\n" + "   <numeric-attribute group=\"group-x\" name=\"cores\" type=\"gauge\" identifier=\"some-oid\" value=\"1\"/>\n" + "</collection-resource>" } });
}
Also used : CollectionResourceDTO(org.opennms.netmgt.collection.dto.CollectionResourceDTO) NodeLevelResource(org.opennms.netmgt.collection.support.builder.NodeLevelResource) NumericAttribute(org.opennms.netmgt.collection.support.builder.NumericAttribute) Parameters(org.junit.runners.Parameterized.Parameters)

Aggregations

Parameters (org.junit.runners.Parameterized.Parameters)1 CollectionResourceDTO (org.opennms.netmgt.collection.dto.CollectionResourceDTO)1 NodeLevelResource (org.opennms.netmgt.collection.support.builder.NodeLevelResource)1 NumericAttribute (org.opennms.netmgt.collection.support.builder.NumericAttribute)1