use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class DeepTrimToLowerNormalizerTest method testInsignifiantSpacesStringTwoChars.
@Test
public void testInsignifiantSpacesStringTwoChars() throws LdapException {
Normalizer normalizer = new DeepTrimToLowerNormalizer("1.1.1");
assertEquals(" aa ", normalizer.normalize("aa"));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class DeepTrimToLowerNormalizerTest method testMapToSpace.
@Test
public void testMapToSpace() throws Exception {
Normalizer normalizer = new DeepTrimToLowerNormalizer("1.1.1");
char[] chars = new char[] { 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0085, 0x00A0, 0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x2028, 0x2029, 0x202F, 0x205F };
assertEquals(" ", normalizer.normalize(new String(chars)));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class DeepTrimToLowerNormalizerTest method testDeepTrimToLowerNormalizerNull.
@Test
public void testDeepTrimToLowerNormalizerNull() throws LdapException {
Normalizer normalizer = new DeepTrimToLowerNormalizer("1.1.1");
assertNull(normalizer.normalize((String) null));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class DeepTrimToLowerNormalizerTest method testDeepTrimToLowerNormalizerEmpty.
@Test
public void testDeepTrimToLowerNormalizerEmpty() throws LdapException {
Normalizer normalizer = new DeepTrimToLowerNormalizer("1.1.1");
assertEquals(" ", normalizer.normalize(""));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class DeepTrimToLowerNormalizerTest method testDeepTrimToLowerNormalizerTwoSpaces.
@Test
public void testDeepTrimToLowerNormalizerTwoSpaces() throws LdapException {
Normalizer normalizer = new DeepTrimToLowerNormalizer("1.1.1");
assertEquals(" ", normalizer.normalize(" "));
}
Aggregations