Examples of LdifFormatParameters


Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters


    public void testToFormattedString_DIRSERVER_285()
    {
        LdifAttrValLine line = LdifAttrValLine.create( "cn", "abc::def:<ghi" ); //$NON-NLS-1$ //$NON-NLS-2$
        LdifFormatParameters formatParameters = new LdifFormatParameters( true, 78, "\n" ); //$NON-NLS-1$
        String formattedString = line.toFormattedString( formatParameters );
        assertEquals( formattedString, "cn: abc::def:<ghi\n" ); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters

    {
        Preferences store = BrowserCorePlugin.getDefault().getPluginPreferences();
        boolean spaceAfterColon = store.getBoolean( BrowserCoreConstants.PREFERENCE_LDIF_SPACE_AFTER_COLON );
        int lineWidth = store.getInt( BrowserCoreConstants.PREFERENCE_LDIF_LINE_WIDTH );
        String lineSeparator = store.getString( BrowserCoreConstants.PREFERENCE_LDIF_LINE_SEPARATOR );
        LdifFormatParameters ldifFormatParameters = new LdifFormatParameters( spaceAfterColon, lineWidth, lineSeparator );
        return ldifFormatParameters;
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters

{

    public void testToFormattedStringSimple()
    {
        LdifAttrValLine line = LdifAttrValLine.create( "cn", "abc" );
        LdifFormatParameters formatParameters = new LdifFormatParameters( true, 78, "\n" );
        String formattedString = line.toFormattedString( formatParameters );
        assertEquals( formattedString, "cn: abc\n" );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters

    public void testToFormattedStringLineWrap()
    {
        LdifAttrValLine line = LdifAttrValLine.create( "cn",
            "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxy" );
        LdifFormatParameters formatParameters = new LdifFormatParameters( true, 78, "\n" );
        String formattedString = line.toFormattedString( formatParameters );
        assertEquals( formattedString,
            "cn: abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvw\n xyzabcdefghijklmnopqrstuvwxy\n" );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters


    public void testToFormattedStringNoSpaceAfterColon()
    {
        LdifAttrValLine line = LdifAttrValLine.create( "cn", "abc" );
        LdifFormatParameters formatParameters = new LdifFormatParameters( false, 78, "\n" );
        String formattedString = line.toFormattedString( formatParameters );
        assertEquals( formattedString, "cn:abc\n" );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters


    public void testToFormattedStringBase64()
    {
        LdifAttrValLine line = LdifAttrValLine.create( "cn", "\u00e4\u00f6\u00fc" );
        LdifFormatParameters formatParameters = new LdifFormatParameters( true, 78, "\n" );
        String formattedString = line.toFormattedString( formatParameters );
        assertEquals( formattedString, "cn:: w6TDtsO8\n" );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters


    public void testToFormattedString_DIRSERVER_285()
    {
        LdifAttrValLine line = LdifAttrValLine.create( "cn", "abc::def:<ghi" );
        LdifFormatParameters formatParameters = new LdifFormatParameters( true, 78, "\n" );
        String formattedString = line.toFormattedString( formatParameters );
        assertEquals( formattedString, "cn: abc::def:<ghi\n" );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters

{

    public void testToFormattedStringSimple()
    {
        LdifDnLine dnLine = LdifDnLine.create( "cn=abc,ou=department,o=org,dc=example,dc=com" );
        LdifFormatParameters formatParameters = new LdifFormatParameters( true, 78, "\n" );
        String formattedString = dnLine.toFormattedString( formatParameters );
        assertEquals( formattedString, "dn: cn=abc,ou=department,o=org,dc=example,dc=com\n" );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters


    public void testToFormattedStringNewline()
    {
        LdifDnLine dnLine = LdifDnLine.create( "cn=abc,ou=department,o=org,dc=example,dc=com" );
        LdifFormatParameters formatParameters = new LdifFormatParameters( true, 78, "\r\n" );
        String formattedString = dnLine.toFormattedString( formatParameters );
        assertEquals( formattedString, "dn: cn=abc,ou=department,o=org,dc=example,dc=com\r\n" );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldifparser.LdifFormatParameters

    public void testToFormattedStringLineWrap()
    {
        LdifDnLine dnLine = LdifDnLine
            .create( "cn=abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxy,ou=department,o=org,dc=example,dc=com" );
        LdifFormatParameters formatParameters = new LdifFormatParameters( true, 78, "\n" );
        String formattedString = dnLine.toFormattedString( formatParameters );
        assertEquals( formattedString, "dn: cn=abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxy,ou=department,o=org"
            + "\n ,dc=example,dc=com\n" );
    }
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.