use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class NumericNormalizerTest method testInsignifiantNumericCharsSpaces.
@Test
public void testInsignifiantNumericCharsSpaces() throws LdapException {
Normalizer normalizer = new NumericNormalizer();
assertEquals("1", normalizer.normalize(" 1"));
assertEquals("1", normalizer.normalize("1 "));
assertEquals("1", normalizer.normalize(" 1 "));
assertEquals("11", normalizer.normalize("1 1"));
assertEquals("11", normalizer.normalize(" 1 1"));
assertEquals("11", normalizer.normalize("1 1 "));
assertEquals("11", normalizer.normalize("1 1"));
assertEquals("11", normalizer.normalize(" 1 1 "));
assertEquals("123456789", normalizer.normalize(" 123 456 789 "));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class NumericNormalizerTest method testNumericNormalizerNSpaces.
@Test
public void testNumericNormalizerNSpaces() throws LdapException {
Normalizer normalizer = new NumericNormalizer();
assertEquals("", normalizer.normalize(" "));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class NumericNormalizerTest method testInsignifiantSpacesStringNChars.
@Test
public void testInsignifiantSpacesStringNChars() throws LdapException {
Normalizer normalizer = new NumericNormalizer();
assertEquals("123456", normalizer.normalize("123456"));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class NumericNormalizerTest method testNumericNormalizerEmpty.
@Test
public void testNumericNormalizerEmpty() throws LdapException {
Normalizer normalizer = new NumericNormalizer();
assertEquals("", normalizer.normalize(""));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class TelephoneNumberNormalizerTest method testTelephoneNumberNormalizerOneHyphen.
@Test
public void testTelephoneNumberNormalizerOneHyphen() throws LdapException {
Normalizer normalizer = new TelephoneNumberNormalizer();
assertEquals("", normalizer.normalize("-"));
}
Aggregations