}
public void testConstructor_WithProps_DSEQAvTv()
throws InvalidNameException {
log.setMethod("testConstructor_WithProps_DSEQAvTv()");
CompoundName name, name2;
props.clear();
props.put("jndi.syntax.direction", "left_to_right");
props.put("jndi.syntax.separator", "/");
props.put("jndi.syntax.escape", "\\");
props.put("jndi.syntax.beginquote", "<");
props.put("jndi.syntax.endquote", ">");
props.put("jndi.syntax.beginquote2", "'");
props.put("jndi.syntax.endquote2", "'");
props.put("jndi.syntax.separator.ava", ",");
props.put("jndi.syntax.separator.typeval", "=");
name = new CompoundName("a='b'/c", props);
assertNameEquals(name, "a='b'", "c");
assertInvalidName("a='b',/c", props);
assertInvalidName("a='b',c/d", props);
assertInvalidName("a='b',c=d/e", props);
name = new CompoundName("a=<b/b>/abc", props);
assertNameEquals(name, "a=<b/b>", "abc");
name = new CompoundName("a=b='c'/d", props);
assertNameEquals(name, "a=b='c'", "d");
assertInvalidName("CN=<Ima Random>, O=HMY, C=UK", props);
assertInvalidName("CN=<Ima Random, O=HMY, C=UK", props);
name = new CompoundName("CN=<Ima Random>/O=HMY/C=UK", props);
assertNameEquals(name, "CN=<Ima Random>", "O=HMY", "C=UK");
assertInvalidName("CN=<Ima Random/O=HMY/C=UK", props);
name = new CompoundName("a=b'b',c='d'/abc'", props);
assertNameEquals(name, "a=b'b',c='d'", "abc'");
assertInvalidName("a='b\\',c='d'/abc", props);
assertInvalidName("a='b',/abc", props);
assertInvalidName("a='b',abc/abc", props);
assertInvalidName("'<a>'=b,c=d/abc", props);
assertInvalidName("'a=b,c=d/abc", props);
name = new CompoundName("a=,c=d/abc", props);
assertNameEquals(name, "a=,c=d", "abc");
name = new CompoundName("=b,c=d/abc", props);
assertNameEquals(name, "=b,c=d", "abc");
assertInvalidName("''=b,c=d/abc", props);
assertInvalidName("a='b\\,b',c=d/abc", props);
assertInvalidName("a\\=a='b',c=d/abc", props);
name = new CompoundName(",,/,,", props);
assertNameEquals(name, ",,", ",,");
name = new CompoundName("a=/bc", props);
assertNameEquals(name, "a=", "bc");
name = new CompoundName("=b/bc", props);
assertNameEquals(name, "=b", "bc");
name = new CompoundName("=/bc", props);
assertNameEquals(name, "=", "bc");
// Does escape work for typeval?
name = new CompoundName("a\\='b/c'/d", props);
assertEquals("<a\\='b/c'>/d", name.toString());
assertNameEquals(name, "a\\='b/c'", "d");
name = new CompoundName("a=b, c=d/a=b, c=d", props);
name2 = new CompoundName("a=b,c=d/a=b,c=d", props);
assertFalse(name.equals(name2));
props.put("jndi.syntax.trimblanks", "true");
name = new CompoundName("a=b, c=d/a=b, c=d", props);
name2 = new CompoundName("a=b,c=d/a=b,c=d", props);
assertFalse(name.equals(name2));
name = new CompoundName("a=b,c=d/a=b,c=d", props);
name2 = new CompoundName("A=B,C=D/A=B,C=D", props);
assertFalse(name.equals(name2));
props.put("jndi.syntax.ignorecase", "true");
name = new CompoundName("a=b,c=d/a=b,c=d", props);
name2 = new CompoundName("A=B,C=D/A=B,C=D", props);
assertTrue(name.equals(name2));
}