use of org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimNormalizer in project directory-ldap-api by apache.
the class DeepTrimNormalizerTest method testNormalizeIgnore.
@Test
public void testNormalizeIgnore() throws Exception {
Normalizer normalizer = new DeepTrimNormalizer("1.1.1");
char[] chars = new char[58];
int pos = 0;
for (char c = 0x0000; c < 0x0008; c++) {
chars[pos++] = c;
}
for (char c = 0x000E; c < 0x001F; c++) {
chars[pos++] = c;
}
for (char c = 0x007F; c < 0x0084; c++) {
chars[pos++] = c;
}
for (char c = 0x0086; c < 0x009F; c++) {
chars[pos++] = c;
}
chars[pos++] = 0x00AD;
assertEquals(" ", normalizer.normalize(new String(chars)));
}
use of org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimNormalizer in project directory-ldap-api by apache.
the class DeepTrimNormalizerTest method testInsignifiantSpacesStringOneChar.
@Test
public void testInsignifiantSpacesStringOneChar() throws LdapException {
Normalizer normalizer = new DeepTrimNormalizer("1.1.1");
assertEquals(" a ", normalizer.normalize("a"));
}
use of org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimNormalizer in project directory-ldap-api by apache.
the class DeepTrimNormalizerTest method testDeepTrimNormalizerOneSpace.
@Test
public void testDeepTrimNormalizerOneSpace() throws LdapException {
Normalizer normalizer = new DeepTrimNormalizer("1.1.1");
assertEquals(" ", normalizer.normalize(" "));
}
use of org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimNormalizer in project directory-ldap-api by apache.
the class DeepTrimNormalizerTest method testDeepTrimNormalizerTwoSpaces.
@Test
public void testDeepTrimNormalizerTwoSpaces() throws LdapException {
Normalizer normalizer = new DeepTrimNormalizer("1.1.1");
assertEquals(" ", normalizer.normalize(" "));
}
use of org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimNormalizer in project directory-ldap-api by apache.
the class DeepTrimNormalizerTest method testInsignifiantSpacesStringNChars.
@Test
public void testInsignifiantSpacesStringNChars() throws LdapException {
Normalizer normalizer = new DeepTrimNormalizer("1.1.1");
assertEquals(" aaaaa ", normalizer.normalize("aaaaa"));
}
Aggregations