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

Examples of org.apache.directory.shared.ldap.model.schema.normalizers.DeepTrimNormalizer.normalize()


{
    @Test
    public void testDeepTrimNormalizerNull() throws LdapException
    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        assertEquals( "", normalizer.normalize( ( String ) null ) );
    }


    @Test
    public void testDeepTrimNormalizerEmpty() throws LdapException
View Full Code Here


    @Test
    public void testDeepTrimNormalizerEmpty() throws LdapException
    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        assertEquals( "", normalizer.normalize( "" ) );
    }


    @Test
    public void testDeepTrimNormalizerOneSpace() throws LdapException
View Full Code Here

    @Test
    public void testDeepTrimNormalizerOneSpace() throws LdapException
    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        assertEquals( " ", normalizer.normalize( " " ) );
    }


    @Test
    public void testDeepTrimNormalizerTwoSpaces() throws LdapException
View Full Code Here

    @Test
    public void testDeepTrimNormalizerTwoSpaces() throws LdapException
    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        assertEquals( " ", normalizer.normalize( "  " ) );
    }


    @Test
    public void testDeepTrimNormalizerNSpaces() throws LdapException
View Full Code Here

    @Test
    public void testDeepTrimNormalizerNSpaces() throws LdapException
    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        assertEquals( " ", normalizer.normalize( "      " ) );
    }


    @Test
    public void testInsignifiantSpacesStringOneChar() throws LdapException
View Full Code Here

    @Test
    public void testInsignifiantSpacesStringOneChar() throws LdapException
    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        assertEquals( "a", normalizer.normalize( "a" ) );
    }


    @Test
    public void testInsignifiantSpacesStringTwoChars() throws LdapException
View Full Code Here

    @Test
    public void testInsignifiantSpacesStringTwoChars() throws LdapException
    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        assertEquals( "aa", normalizer.normalize( "aa" ) );
    }


    @Test
    public void testInsignifiantSpacesStringNChars() throws LdapException
View Full Code Here

    @Test
    public void testInsignifiantSpacesStringNChars() throws LdapException
    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        assertEquals( "aaaaa", normalizer.normalize( "aaaaa" ) );
    }


    @Test
    public void testInsignifiantSpacesStringOneCombining() throws LdapException
View Full Code Here

        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        char[] chars = new char[]
            { ' ', 0x0310 };
        char[] expected = new char[]
            { ' ', 0x0310 };
        assertEquals( new String( expected ), normalizer.normalize( new String( chars ) ) );
    }


    @Test
    public void testInsignifiantSpacesStringNCombining() throws LdapException
View Full Code Here

        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        char[] chars = new char[]
            { ' ', 0x0310, ' ', 0x0311, ' ', 0x0312 };
        char[] expected = new char[]
            { ' ', 0x0310, ' ', 0x0311, ' ', 0x0312 };
        assertEquals( new String( expected ), normalizer.normalize( new String( chars ) ) );
    }


    @Test
    public void testInsignifiantSpacesStringCharsSpaces() throws LdapException
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.