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

Examples of org.apache.directory.api.ldap.model.schema.syntaxCheckers.UuidSyntaxChecker


    @Test
    public void testNestedNotnOrnAnd() throws Exception
    {
        String filter = "(&(|(postalCode=5)(postalCode=6))(!(ou=sales)))";

        UuidSyntaxChecker uuidSynChecker = new UuidSyntaxChecker();

        ExprNode exprNode = FilterParser.parse( schemaManager, filter );
        optimizer.annotate( exprNode );

        Cursor<Entry> cursor = buildCursor( exprNode );

        Set<String> set = new HashSet<String>();

        while ( cursor.next() )
        {
            assertTrue( cursor.available() );

            Entry entry = cursor.get();

            String uuid = entry.get( "entryUUID" ).getString();
            set.add( uuid );
            assertTrue( uuidSynChecker.isValidSyntax( uuid ) );
        }

        assertEquals( 2, set.size() );
        assertTrue( set.contains( Strings.getUUID( 7L ) ) );
        assertTrue( set.contains( Strings.getUUID( 8L ) ) );
View Full Code Here


    @Test
    public void testNestedNotnOrnAnd() throws Exception
    {
        String filter = "(&(|(postalCode=5)(postalCode=6))(!(ou=sales)))";

        UuidSyntaxChecker uuidSynChecker = new UuidSyntaxChecker();

        ExprNode exprNode = FilterParser.parse( schemaManager, filter );
        optimizer.annotate( exprNode );

        Cursor<Entry> cursor = buildCursor( exprNode );

        Set<String> set = new HashSet<String>();

        while ( cursor.next() )
        {
            assertTrue( cursor.available() );

            Entry entry = cursor.get();

            String uuid = entry.get( "entryUUID" ).getString();
            set.add( uuid );
            assertTrue( uuidSynChecker.isValidSyntax( uuid ) );
        }

        assertEquals( 2, set.size() );
        assertTrue( set.contains( Strings.getUUID( 7L ) ) );
        assertTrue( set.contains( Strings.getUUID( 8L ) ) );
View Full Code Here

    @Test
    public void testNestedNotnOrnAnd() throws Exception
    {
        String filter = "(&(|(postalCode=5)(postalCode=6))(!(ou=sales)))";

        UuidSyntaxChecker uuidSynChecker = new UuidSyntaxChecker();

        ExprNode exprNode = FilterParser.parse( schemaManager, filter );
        optimizer.annotate( exprNode );

        Cursor<Entry> cursor = buildCursor( exprNode );

        Set<String> set = new HashSet<String>();

        while ( cursor.next() )
        {
            assertTrue( cursor.available() );

            Entry entry = cursor.get();

            String uuid = entry.get( "entryUUID" ).getString();
            set.add( uuid );
            assertTrue( uuidSynChecker.isValidSyntax( uuid ) );
        }

        assertEquals( 2, set.size() );
        assertTrue( set.contains( Strings.getUUID( 7L ) ) );
        assertTrue( set.contains( Strings.getUUID( 8L ) ) );
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.schema.syntaxCheckers.UuidSyntaxChecker

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.