use of org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer 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.normalizers.DeepTrimToLowerNormalizer 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.normalizers.DeepTrimToLowerNormalizer 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(" "));
}
use of org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer in project directory-ldap-api by apache.
the class DeepTrimToLowerNormalizerTest method testInsignifiantSpacesStringNChars.
@Test
public void testInsignifiantSpacesStringNChars() throws LdapException {
Normalizer normalizer = new DeepTrimToLowerNormalizer("1.1.1");
assertEquals(" aaaaa ", normalizer.normalize("aaaaa"));
}
use of org.apache.directory.api.ldap.model.schema.normalizers.DeepTrimToLowerNormalizer in project directory-ldap-api by apache.
the class DeepTrimToLowerNormalizerTest method testInsignifiantSpacesStringCharsSpaces.
@Test
public void testInsignifiantSpacesStringCharsSpaces() throws LdapException {
Normalizer normalizer = new DeepTrimToLowerNormalizer("1.1.1");
assertEquals(" a ", normalizer.normalize(" a"));
assertEquals(" a ", normalizer.normalize("a "));
assertEquals(" a ", normalizer.normalize(" a "));
assertEquals(" a a ", normalizer.normalize("a a"));
assertEquals(" a a ", normalizer.normalize(" a a"));
assertEquals(" a a ", normalizer.normalize("a a "));
assertEquals(" a a ", normalizer.normalize("a a"));
assertEquals(" a a ", normalizer.normalize(" a a "));
assertEquals(" aaa aaa aaa ", normalizer.normalize(" aaa aaa aaa "));
}
Aggregations