Package javax.naming

Examples of javax.naming.CompoundName.compareTo()


    log.setMethod("testCompareTo_Null()");
    CompoundName name;

    name = new CompoundName("a/b/c/d", props);
    try {
      name.compareTo(null);
      fail("compareTo(null) should throw ClassCastException");
    } catch (ClassCastException e) {
    }
  }
View Full Code Here


    log.setMethod("testCompareTo_NotCompoundName()");
    CompoundName name;

    name = new CompoundName("a/b/c/d", props);
    try {
      name.compareTo(new CompositeName("a/b/c"));
      fail("compareTo(CompositeName) should throw ClassCastException");
    } catch (ClassCastException e) {
    }
  }
View Full Code Here

    props2.put("jndi.syntax.ignorecase", "true");
    props2.put("jndi.syntax.trimblanks", "false");
    CompoundName abcd_ic = new CompoundName("a/b/c/d", props2);
    CompoundName ABCD_ic = new CompoundName("A/B/C/D", props2);
    assertEquals(0, abcd_ic.compareTo(ABCD_ic));
    assertEquals(0, ABCD_ic.compareTo(abcd_ic));
    assertEquals(0, abcd_ic.compareTo(abcd));
    assertEquals(0, abcd.compareTo(abcd_ic));
    assertEquals(0, ABCD_ic.compareTo(abcd));
    assertEquals(32, abcd.compareTo(ABCD_ic));
View Full Code Here

    CompoundName ABCD_ic = new CompoundName("A/B/C/D", props2);
    assertEquals(0, abcd_ic.compareTo(ABCD_ic));
    assertEquals(0, ABCD_ic.compareTo(abcd_ic));
    assertEquals(0, abcd_ic.compareTo(abcd));
    assertEquals(0, abcd.compareTo(abcd_ic));
    assertEquals(0, ABCD_ic.compareTo(abcd));
    assertEquals(32, abcd.compareTo(ABCD_ic));

    props2.put("jndi.syntax.ignorecase", "false");
    props2.put("jndi.syntax.trimblanks", "true");
    CompoundName abcd_tb = new CompoundName("a/b/c/d", props2);
View Full Code Here

    props2.put("jndi.syntax.ignorecase", "false");
    props2.put("jndi.syntax.trimblanks", "true");
    CompoundName abcd_tb = new CompoundName("a/b/c/d", props2);
    CompoundName _a_b_c_d_tb = new CompoundName(" a / b / c / d ", props2);
    assertEquals(0, abcd_tb.compareTo(_a_b_c_d_tb));
    assertEquals(0, _a_b_c_d_tb.compareTo(abcd_tb));
    assertEquals(0, abcd_tb.compareTo(abcd));
    assertEquals(0, abcd.compareTo(abcd_tb));
    assertEquals(65, abcd.compareTo(_a_b_c_d_tb));
    assertEquals(0, _a_b_c_d_tb.compareTo(abcd));
  }
View Full Code Here

    assertEquals(0, abcd_tb.compareTo(_a_b_c_d_tb));
    assertEquals(0, _a_b_c_d_tb.compareTo(abcd_tb));
    assertEquals(0, abcd_tb.compareTo(abcd));
    assertEquals(0, abcd.compareTo(abcd_tb));
    assertEquals(65, abcd.compareTo(_a_b_c_d_tb));
    assertEquals(0, _a_b_c_d_tb.compareTo(abcd));
  }

  public void testSize() throws InvalidNameException {
    log.setMethod("testSize()");
    CompoundName name;
View Full Code Here

    log.setMethod("testCompareTo_Null()");
    CompoundName name;

    name = new CompoundName("a/b/c/d", props);
    try {
      name.compareTo(null);
      fail("compareTo(null) should throw ClassCastException");
    } catch (ClassCastException e) {
    }
  }
View Full Code Here

    log.setMethod("testCompareTo_NotCompoundName()");
    CompoundName name;

    name = new CompoundName("a/b/c/d", props);
    try {
      name.compareTo(new CompositeName("a/b/c"));
      fail("compareTo(CompositeName) should throw ClassCastException");
    } catch (ClassCastException e) {
    }
  }
View Full Code Here

    props2.put("jndi.syntax.ignorecase", "true");
    props2.put("jndi.syntax.trimblanks", "false");
    CompoundName abcd_ic = new CompoundName("a/b/c/d", props2);
    CompoundName ABCD_ic = new CompoundName("A/B/C/D", props2);
    assertEquals(0, abcd_ic.compareTo(ABCD_ic));
    assertEquals(0, ABCD_ic.compareTo(abcd_ic));
    assertEquals(0, abcd_ic.compareTo(abcd));
    assertEquals(0, abcd.compareTo(abcd_ic));
    assertEquals(0, ABCD_ic.compareTo(abcd));
    assertEquals(32, abcd.compareTo(ABCD_ic));
View Full Code Here

    CompoundName ABCD_ic = new CompoundName("A/B/C/D", props2);
    assertEquals(0, abcd_ic.compareTo(ABCD_ic));
    assertEquals(0, ABCD_ic.compareTo(abcd_ic));
    assertEquals(0, abcd_ic.compareTo(abcd));
    assertEquals(0, abcd.compareTo(abcd_ic));
    assertEquals(0, ABCD_ic.compareTo(abcd));
    assertEquals(32, abcd.compareTo(ABCD_ic));

    props2.put("jndi.syntax.ignorecase", "false");
    props2.put("jndi.syntax.trimblanks", "true");
    CompoundName abcd_tb = new CompoundName("a/b/c/d", props2);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.