Package org.jboss.jmx.adaptor.snmp.agent

Examples of org.jboss.jmx.adaptor.snmp.agent.ComparableSnmpObjectId


   * Make sure, that the passed oid which does not end in .0
   * is not detected as leaf.
   */
  public void testIsNotLeaf()
  {
    ComparableSnmpObjectId coid = new ComparableSnmpObjectId(".1.2.3.4");
    boolean res = coid.isLeaf();
    assertFalse(res);
  }
View Full Code Here


  /**
   * Make sure that the passed oid ending in .0 is detected as leaf.
   */
  public void testIsLeaf()
  {
    ComparableSnmpObjectId coid = new ComparableSnmpObjectId(".1.2.3.4.0");
    boolean res = coid.isLeaf();
    assertTrue(res);
  }
View Full Code Here

  /**
   * Make sure that the passed oid ending in .0 is detected as leaf.
   */
  public void testIsLeaf2()
  {
    ComparableSnmpObjectId coid = new ComparableSnmpObjectId("1.2.3.4.0");
    boolean res = coid.isLeaf();
    assertTrue(res);
  }
View Full Code Here

   * See if the last part of an oid is correctly chopped of.
   *
   */
  public void testRemoveLastPart()
  {
    ComparableSnmpObjectId coid = new ComparableSnmpObjectId("1.2.3.4.0");
    ComparableSnmpObjectId res = coid.removeLastPart();
    assertEquals(".1.2.3.4",res.toString());
  }
View Full Code Here

   * This is needed for use of the ComparableSnmpObjectId in SortedSets etc.
   * @see java.lang.Comparable
   */
  public void testCompareTo1()
  {
    ComparableSnmpObjectId coid = new ComparableSnmpObjectId("1.2.3.4.0");
    ComparableSnmpObjectId coid2 = new ComparableSnmpObjectId(".1.2.3.4.0");
    int res = coid.compareTo(coid2);
    assertEquals(0,res);
  }
View Full Code Here

   * This is needed for use of the ComparableSnmpObjectId in SortedSets etc.
   * @see java.lang.Comparable
   */
  public void testCompareTo2()
  {
    ComparableSnmpObjectId coid = new ComparableSnmpObjectId("1.2.3.4");
    ComparableSnmpObjectId coid2 = new ComparableSnmpObjectId("1.2.3.4.0");
    int res = coid.compareTo(coid2);
    assertTrue(res!=0);
  }
View Full Code Here

   * This is needed for use of the ComparableSnmpObjectId in SortedSets etc.
   * @see java.lang.Comparable
   */
  public void testCompareTo3()
  {
    ComparableSnmpObjectId coid  = new ComparableSnmpObjectId("1.2.3.4.1");
    ComparableSnmpObjectId coid2 = new ComparableSnmpObjectId("1.2.3.4.2");
    int res = coid.compareTo(coid2);
    assertTrue(res<0);
  }
View Full Code Here

   * This is needed for use of the ComparableSnmpObjectId in SortedSets etc.
   * @see java.lang.Comparable
   */
  public void testCompareTo4()
  {
    ComparableSnmpObjectId coid  = new ComparableSnmpObjectId("1.2.3.4.2");
    ComparableSnmpObjectId coid2 = new ComparableSnmpObjectId("1.2.3.4.1");
    int res = coid.compareTo(coid2);
    assertTrue(res>0);
  }
View Full Code Here

   * This is needed for use of the ComparableSnmpObjectId in SortedSets etc.
   * @see java.lang.Comparable
   */
  public void testCompareTo5()
  {
    ComparableSnmpObjectId coid  = new ComparableSnmpObjectId("1.2.3.4.2");
    Object coid2 = new Object();
    int res = coid.compareTo(coid2);
    assertTrue(res == -1);
  }
View Full Code Here

  }

 
  public void testGetNextArc()
  {
    ComparableSnmpObjectId coid = new ComparableSnmpObjectId("1.2.3.4");
    ComparableSnmpObjectId res = coid.getNextArc();
    assertEquals(".1.2.4",res.toString());
  }
View Full Code Here

TOP

Related Classes of org.jboss.jmx.adaptor.snmp.agent.ComparableSnmpObjectId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.