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

Examples of org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescription


    @Test
    public void testBytecode() throws ParseException
    {
        String value = null;
        SyntaxCheckerDescription syntaxCheckerDescription = null;

        // FQCN simple p
        value = "( 1.1 FQCN org.apache.directory.SimpleSyntaxChecker BYTECODE ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789==== )";
        syntaxCheckerDescription = parser.parseSyntaxCheckerDescription( value );
        assertNotNull( syntaxCheckerDescription.getBytecode() );
        assertEquals( "ABCDEFGHIJKLMNOPQRSTUVWXYZ+/abcdefghijklmnopqrstuvwxyz0123456789====", syntaxCheckerDescription
            .getBytecode() );
    }
View Full Code Here


    @Test
    public void testSimpleSyntaxChecker() throws ParseException
    {
        String simple = "( " + OID + " FQCN " + FQCN + " )";
        SyntaxCheckerDescription syntaxCheckerDescription = parser.parseSyntaxCheckerDescription( simple );
        assertNotNull( syntaxCheckerDescription );
        assertEquals( OID, syntaxCheckerDescription.getOid() );
        assertEquals( FQCN, syntaxCheckerDescription.getFqcn() );
        assertNull( syntaxCheckerDescription.getBytecode() );
        assertNull( syntaxCheckerDescription.getDescription() );
    }
View Full Code Here

    @Test
    public void testSyntaxCheckerWithDesc() throws ParseException
    {
        String simple = "( " + OID + " DESC '" + DESC + "' FQCN " + FQCN + " )";
        SyntaxCheckerDescription syntaxCheckerDescription = parser.parseSyntaxCheckerDescription( simple );
        assertNotNull( syntaxCheckerDescription );
        assertEquals( OID, syntaxCheckerDescription.getOid() );
        assertEquals( FQCN, syntaxCheckerDescription.getFqcn() );
        assertNull( syntaxCheckerDescription.getBytecode() );
        assertEquals( DESC, syntaxCheckerDescription.getDescription() );
    }
View Full Code Here

    @Test
    public void testSyntaxCheckerWithDescAndByteCode() throws ParseException
    {
        String simple = "( " + OID + " DESC '" + DESC + "' FQCN " + FQCN + " BYTECODE " + BYTECODE + " )";
        SyntaxCheckerDescription syntaxCheckerDescription = parser.parseSyntaxCheckerDescription( simple );
        assertNotNull( syntaxCheckerDescription );
        assertEquals( OID, syntaxCheckerDescription.getOid() );
        assertEquals( FQCN, syntaxCheckerDescription.getFqcn() );
        assertEquals( BYTECODE, syntaxCheckerDescription.getBytecode() );
        assertEquals( DESC, syntaxCheckerDescription.getDescription() );
    }
View Full Code Here

    @Test
    public void testSyntaxCheckerExample() throws ParseException
    {
        String simple = "( 1.3.6.1.4.1.18060.0.4.1.0.10000 DESC 'bogus desc' FQCN org.apache.directory.shared.ldap.schema.syntax.OctetStringSyntaxChecker )";
        SyntaxCheckerDescription syntaxCheckerDescription = parser.parseSyntaxCheckerDescription( simple );
        assertNotNull( syntaxCheckerDescription );
    }
View Full Code Here

            + "AASortQACsQAAAAEACwAAAA4AAwAAAAsABAAMAAkADQABAAgADAABAAoAAAAhAAEAAQAAAAUqtwABsQAAAAEACw"
            + "AAAAoAAgAAABEABAASAAEADQAJAAEACgAAACIAAgACAAAABiortQACsQAAAAEACwAAAAoAAgAAABcABQAYAAEAD"
            + "gAPAAEACgAAAB0AAQABAAAABSq0AAKwAAAAAQALAAAABgABAAAAHQABABAAEQABAAoAAAAaAAEAAgAAAAIErAAA"
            + "AAEACwAAAAYAAQAAACMAAQASABMAAgAKAAAAGQAAAAIAAAABsQAAAAEACwAAAAYAAQAAACkAFAAAAAQAAQAVAAE"
            + "AFgAAAAIAFw== X-SCHEMA 'nis' )";
        SyntaxCheckerDescription syntaxCheckerDescription = parser.parseSyntaxCheckerDescription( simple );
        assertNotNull( syntaxCheckerDescription );
        assertEquals( "1.3.6.1.4.1.18060.0.4.1.0.10002", syntaxCheckerDescription.getOid() );
        assertEquals( "DummySyntaxChecker", syntaxCheckerDescription.getFqcn() );
        assertNotNull( syntaxCheckerDescription.getBytecode() );
        assertEquals( "bogus desc", syntaxCheckerDescription.getDescription() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescription

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.