本文整理汇总了Java中javax.naming.ldap.LdapName.remove方法的典型用法代码示例。如果您正苦于以下问题:Java LdapName.remove方法的具体用法?Java LdapName.remove怎么用?Java LdapName.remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.naming.ldap.LdapName
的用法示例。
在下文中一共展示了LdapName.remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testRemove005
import javax.naming.ldap.LdapName; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.LdapName.remove(int)'
* </p>
* <p>
* Here we are testing if this method correctly removes the name at the
* specified index from an LdapName.
* </p>
* <p>
* The expected result is an IndexOutOfBoundsException.
* </p>
*/
public void testRemove005() throws Exception {
try {
LdapName ln = new LdapName("");
ln.remove(0);
fail("IndexOutOfBoundsException expected");
} catch (IndexOutOfBoundsException e) {}
}
示例2: testIsEmpty002
import javax.naming.ldap.LdapName; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.LdapName.isEmpty()'
* </p>
* <p>
* Here we are testing if this method returns true when an LdapName is empty
* and false when it is not.
* </p>
* <p>
* The expected result is a true.
* </p>
*/
public void testIsEmpty002() throws Exception {
LdapName ln = new LdapName("t=test");
ln.remove(0);
assertTrue(ln.isEmpty());
}
示例3: testRemove004
import javax.naming.ldap.LdapName; //导入方法依赖的package包/类
/**
* <p>
* Test method for 'javax.naming.ldap.LdapName.remove(int)'
* </p>
* <p>
* Here we are testing if this method correctly removes the name at the
* specified index from an LdapName.
* </p>
* <p>
* The expected result is that the name at the specified index is removed.
* </p>
*/
public void testRemove004() throws Exception {
LdapName ln = new LdapName("t=test");
ln.remove(0);
assertEquals("", ln.toString());
}