Package org.apache.directory.api.ldap.model.schema.normalizers

Examples of org.apache.directory.api.ldap.model.schema.normalizers.NumericNormalizer



    @Test
    public void testNumericNormalizerEmpty() throws LdapException
    {
        Normalizer normalizer = new NumericNormalizer();
        assertEquals( "", normalizer.normalize( "" ) );
    }
View Full Code Here



    @Test
    public void testNumericNormalizerOneSpace() throws LdapException
    {
        Normalizer normalizer = new NumericNormalizer();
        assertEquals( "", normalizer.normalize( " " ) );
    }
View Full Code Here


    @Test
    public void testNumericNormalizerTwoSpaces() throws LdapException
    {
        Normalizer normalizer = new NumericNormalizer();
        assertEquals( "", normalizer.normalize( "  " ) );
    }
View Full Code Here


    @Test
    public void testNumericNormalizerNSpaces() throws LdapException
    {
        Normalizer normalizer = new NumericNormalizer();
        assertEquals( "", normalizer.normalize( "      " ) );
    }
View Full Code Here


    @Test
    public void testInsignifiantSpacesStringOneChar() throws LdapException
    {
        Normalizer normalizer = new NumericNormalizer();
        assertEquals( "1", normalizer.normalize( "1" ) );
    }
View Full Code Here


    @Test
    public void testInsignifiantSpacesStringTwoChars() throws LdapException
    {
        Normalizer normalizer = new NumericNormalizer();
        assertEquals( "11", normalizer.normalize( "11" ) );
    }
View Full Code Here


    @Test
    public void testInsignifiantSpacesStringNChars() throws LdapException
    {
        Normalizer normalizer = new NumericNormalizer();
        assertEquals( "123456", normalizer.normalize( "123456" ) );
    }
View Full Code Here


    @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  " ) );
    }
View Full Code Here

public class NumericNormalizerTest
{
    @Test
    public void testNumericNormalizerNull() throws LdapException
    {
        Normalizer normalizer = new NumericNormalizer();
        assertEquals( "", normalizer.normalize( ( String ) null ) );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.schema.normalizers.NumericNormalizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.