@Test
public void testAvaValuesSchemaAware() throws LdapException
{
String errors = null;
Ava ava = new Ava( schemaManager, "OU", "Exemple + Rdn\u00E4 " );
if ( !"2.5.4.11=exemple \\+ rdn\u00E4".equals( ava.getNormName() ) )
{
errors = "\nAva.getNormName fails '" + ava.getNormName() + "'";
}
if ( !"2.5.4.11".equals( ava.getNormType() ) )
{
errors += "\nAva.getNormType fails '" + ava.getNormType() + "'";
}
if ( !"exemple + rdn\u00E4".equals( ava.getNormValue().getString() ) )
{
errors += "\nAva.getNormValue fails '" + ava.getNormValue().getString() + "'";
}
if ( !"OU=Exemple \\+ Rdn\u00E4\\ ".equals( ava.getName() ) )
{
errors += "\nAva.getUpName fails '" + ava.getName() + "'";
}
if ( !"OU".equals( ava.getType() ) )
{
errors += "\nAva.getUpType fails '" + ava.getType() + "'";
}
if ( !"Exemple + Rdn\u00E4 ".equals( ava.getValue().getString() ) )
{
errors += "\nAva.getUpValue fails '" + ava.getValue().getString() + "'";
}
if ( !"2.5.4.11=exemple \\+ rdn\u00E4".equals( ava.normalize() ) )
{
errors += "\nAva.normalize fails '" + ava.normalize() + "'";
}
if ( !"OU=Exemple \\+ Rdn\u00E4\\ ".equals( ava.toString() ) )
{
errors += "\nAva.toString fails '" + ava.toString() + "'";
}
assertEquals( null, errors );
}