use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class TelephoneNumberNormalizerTest method testTelephoneNumberNormalizerEmpty.
@Test
public void testTelephoneNumberNormalizerEmpty() throws LdapException {
Normalizer normalizer = new TelephoneNumberNormalizer();
assertEquals("", normalizer.normalize(""));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class TelephoneNumberNormalizerTest method testTelephoneNumberNormalizerTwoSpaces.
@Test
public void testTelephoneNumberNormalizerTwoSpaces() throws LdapException {
Normalizer normalizer = new TelephoneNumberNormalizer();
assertEquals("", normalizer.normalize(" "));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class TelephoneNumberNormalizerTest method testInsignifiantSpacesStringTwoChars.
@Test
public void testInsignifiantSpacesStringTwoChars() throws LdapException {
Normalizer normalizer = new TelephoneNumberNormalizer();
assertEquals("11", normalizer.normalize("11"));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class TelephoneNumberNormalizerTest method testInsignifiantTelephoneNumberCharsSpaces.
@Test
public void testInsignifiantTelephoneNumberCharsSpaces() throws LdapException {
Normalizer normalizer = new TelephoneNumberNormalizer();
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 "));
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("1(2)+3456789", normalizer.normalize("---1(2)+3 456- 789 --"));
}
use of org.apache.directory.api.ldap.model.schema.Normalizer in project directory-ldap-api by apache.
the class TelephoneNumberNormalizerTest method testTelephoneNumberNormalizerOneSpace.
@Test
public void testTelephoneNumberNormalizerOneSpace() throws LdapException {
Normalizer normalizer = new TelephoneNumberNormalizer();
assertEquals("", normalizer.normalize(" "));
}
Aggregations