Java Code Examples for org.apache.directory.api.ldap.model.name.Rdn#iterator()

The following examples show how to use org.apache.directory.api.ldap.model.name.Rdn#iterator() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RdnTest.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
@Test
public void testMultiValuedIterator() throws LdapException
{
    Rdn rdn = new Rdn( "cn=Kate Bush+sn=Bush" );
    Iterator<Ava> iterator = rdn.iterator();
    assertNotNull( iterator );
    assertTrue( iterator.hasNext() );
    assertNotNull( iterator.next() );
    assertTrue( iterator.hasNext() );
    assertNotNull( iterator.next() );
    assertFalse( iterator.hasNext() );
}
 
Example 2
Source File: RdnTest.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
@Test
public void testSingleValuedIterator() throws LdapException
{
    Rdn rdn = new Rdn( "cn=Kate Bush" );
    Iterator<Ava> iterator = rdn.iterator();
    assertNotNull( iterator );
    assertTrue( iterator.hasNext() );
    assertNotNull( iterator.next() );
    assertFalse( iterator.hasNext() );
}
 
Example 3
Source File: RdnTest.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
@Test
public void testEmptyIterator()
{
    Rdn rdn = new Rdn();
    Iterator<Ava> iterator = rdn.iterator();
    assertNotNull( iterator );
    assertFalse( iterator.hasNext() );
}
 
Example 4
Source File: FastRdnParserTest.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
@Test
public void testSingleValuedIterator() throws LdapException
{
    Rdn rdn = new Rdn( "cn=Kate Bush" );
    Iterator<Ava> iterator = rdn.iterator();
    assertNotNull( iterator );
    assertTrue( iterator.hasNext() );
    assertNotNull( iterator.next() );
    assertFalse( iterator.hasNext() );
}
 
Example 5
Source File: FastRdnParserTest.java    From directory-ldap-api with Apache License 2.0 5 votes vote down vote up
@Test
public void testEmptyIterator()
{
    Rdn rdn = new Rdn();
    Iterator<Ava> iterator = rdn.iterator();
    assertNotNull( iterator );
    assertFalse( iterator.hasNext() );
}