}
}
public void testGetSuffix() throws InvalidNameException {
log.setMethod("testGetSuffix()");
CompoundName name;
// has more than one elements
name = new CompoundName("a/b/c", props);
assertNameEquals(name.getSuffix(0), "a", "b", "c");
assertNameEquals(name.getSuffix(1), "b", "c");
assertNameEquals(name.getSuffix(2), "c");
// assertNameEmpty(name.getSuffix(3)); // worth debate
try {
name.getPrefix(-1);
fail();
} catch (ArrayIndexOutOfBoundsException e) {
}
try {
name.getPrefix(4);
fail();
} catch (ArrayIndexOutOfBoundsException e) {
}
// has no elements
name = new CompoundName("", props);
assertNameEmpty(name.getPrefix(0));
try {
name.getPrefix(-1);
fail();
} catch (ArrayIndexOutOfBoundsException e) {
}
try {
name.getPrefix(1);
fail();
} catch (ArrayIndexOutOfBoundsException e) {
}
}