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

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


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


    @Test
    public void testMapToSpace() throws Exception
View Full Code Here


    {
        Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
        char[] chars = new char[]
            { 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0085, 0x00A0, 0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005,
                0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x2028, 0x2029, 0x202F, 0x205F };
        assertEquals( " ", normalizer.normalize( new String( chars ) ) );
    }


    @Test
    public void testNormalizeIgnore() throws Exception
View Full Code Here

            chars[pos++] = c;
        }

        chars[pos++] = 0x00AD;

        assertEquals( " ", normalizer.normalize( new String( chars ) ) );
    }

    /*
     @Test
     public void testSpeed() throws Exception
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.