use of org.apache.directory.api.ldap.model.name.Ava in project directory-ldap-api by apache.
the class AvaTest method testNormalize.
@Test
public void testNormalize() throws LdapException {
Ava atav = new Ava(schemaManager, " A ", "a");
assertEquals(" A =a", atav.getName());
}
use of org.apache.directory.api.ldap.model.name.Ava in project directory-ldap-api by apache.
the class AvaTest method testEqualsAtav2ValueSuperior.
/**
* Compare two atavs : the second one is superior because its type is
* superior
*/
@Test
public void testEqualsAtav2ValueSuperior() throws LdapException {
Ava atav1 = new Ava(schemaManager, "a", "a");
Ava atav2 = new Ava(schemaManager, "a", "b");
assertFalse(atav1.equals(atav2));
}
use of org.apache.directory.api.ldap.model.name.Ava in project directory-ldap-api by apache.
the class AvaTest method testEqualsAtav2TypeSuperior.
/**
* Compare two atavs : the second one is superior because its type is
* superior
*/
@Test
public void testEqualsAtav2TypeSuperior() throws LdapException {
Ava atav1 = new Ava(schemaManager, "a", "b");
Ava atav2 = new Ava(schemaManager, "b", "b");
assertFalse(atav1.equals(atav2));
}
use of org.apache.directory.api.ldap.model.name.Ava in project directory-ldap-api by apache.
the class FastRdnParserTest method testEmptyIterator.
@Test
public void testEmptyIterator() {
Rdn rdn = new Rdn();
Iterator<Ava> iterator = rdn.iterator();
assertNotNull(iterator);
assertFalse(iterator.hasNext());
}
use of org.apache.directory.api.ldap.model.name.Ava in project directory-ldap-api by apache.
the class FastRdnParserTest method testSingleValuedIterator.
@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());
}
Aggregations