Search in sources :

Example 91 with SnmpValue

use of org.opennms.netmgt.snmp.SnmpValue in project opennms by OpenNMS.

the class SnmpMonitorStrategyTest method testMeetsCriteriaWithCounter64.

@Test
public void testMeetsCriteriaWithCounter64() {
    SnmpValue result = counter64Value(1);
    testSyntaxEquals(result, "1", "2");
    testOrderOperations(result, 1);
}
Also used : SnmpValue(org.opennms.netmgt.snmp.SnmpValue) Test(org.junit.Test)

Example 92 with SnmpValue

use of org.opennms.netmgt.snmp.SnmpValue in project opennms by OpenNMS.

the class SnmpMonitorStrategyTest method testMeetsCriteriaWithCounter32.

@Test
public void testMeetsCriteriaWithCounter32() {
    SnmpValue result = counter32Value(1);
    testSyntaxEquals(result, "1", "2");
    testOrderOperations(result, 1);
}
Also used : SnmpValue(org.opennms.netmgt.snmp.SnmpValue) Test(org.junit.Test)

Example 93 with SnmpValue

use of org.opennms.netmgt.snmp.SnmpValue in project opennms by OpenNMS.

the class SnmpMonitorStrategyTest method testMeetsCriteriaWithTimeTicks.

@Test
public void testMeetsCriteriaWithTimeTicks() {
    SnmpValue result = timeticks("1");
    testSyntaxEquals(result, "1", "2");
    testOrderOperations(result, 1);
}
Also used : SnmpValue(org.opennms.netmgt.snmp.SnmpValue) Test(org.junit.Test)

Example 94 with SnmpValue

use of org.opennms.netmgt.snmp.SnmpValue in project opennms by OpenNMS.

the class SnmpMonitorStrategyTest method testMeetsCriteriaWithNullResult.

@Test
public void testMeetsCriteriaWithNullResult() {
    SnmpValue result = null;
    assertFalse(monitor.meetsCriteria(result, null, null));
}
Also used : SnmpValue(org.opennms.netmgt.snmp.SnmpValue) Test(org.junit.Test)

Example 95 with SnmpValue

use of org.opennms.netmgt.snmp.SnmpValue in project opennms by OpenNMS.

the class SnmpMonitorStrategyTest method testMeetsCriteriaWithInteger.

@Test
public void testMeetsCriteriaWithInteger() {
    SnmpValue result = int32Value(1234);
    testSyntaxEquals(result, "1234", "2234");
    testOrderOperations(result, 1234);
    testSyntaxMatches(result, "23", "14");
}
Also used : SnmpValue(org.opennms.netmgt.snmp.SnmpValue) Test(org.junit.Test)

Aggregations

SnmpValue (org.opennms.netmgt.snmp.SnmpValue)112 Test (org.junit.Test)57 SnmpObjId (org.opennms.netmgt.snmp.SnmpObjId)47 SnmpValueFactory (org.opennms.netmgt.snmp.SnmpValueFactory)24 SnmpAgentConfig (org.opennms.netmgt.snmp.SnmpAgentConfig)21 SnmpInstId (org.opennms.netmgt.snmp.SnmpInstId)20 InetAddress (java.net.InetAddress)19 Map (java.util.Map)14 PollStatus (org.opennms.netmgt.poller.PollStatus)14 JoeSnmpValueFactory (org.opennms.netmgt.snmp.joesnmp.JoeSnmpValueFactory)12 ArrayList (java.util.ArrayList)11 ParameterMap (org.opennms.core.utils.ParameterMap)9 Parm (org.opennms.netmgt.xml.event.Parm)9 PDU (org.snmp4j.PDU)9 AttributeGroupType (org.opennms.netmgt.collection.api.AttributeGroupType)8 SnmpResult (org.opennms.netmgt.snmp.SnmpResult)8 LinkedHashMap (java.util.LinkedHashMap)7 UndeclaredThrowableException (java.lang.reflect.UndeclaredThrowableException)5 HashMap (java.util.HashMap)4 NumericAttributeType (org.opennms.netmgt.collectd.NumericAttributeType)4