Package org.apache.directory.shared.ldap.model.name

Examples of org.apache.directory.shared.ldap.model.name.Dn


    public void testNotEqualDiffCreds() throws LdapException
    {
        BindRequestImpl req0 = new BindRequestImpl();
        req0.setMessageId( 5 );
        req0.setCredentials( "abcdefg".getBytes() );
        req0.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req0.setSimple( true );
        req0.setVersion3( true );

        BindRequestImpl req1 = new BindRequestImpl();
        req1.setMessageId( 5 );
        req1.setCredentials( "password".getBytes() );
        req1.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req1.setSimple( true );
        req1.setVersion3( true );

        assertFalse( req0.equals( req1 ) );
    }
View Full Code Here


    public void testNotEqualDiffName() throws LdapException
    {
        BindRequestImpl req0 = new BindRequestImpl();
        req0.setMessageId( 5 );
        req0.setCredentials( "password".getBytes() );
        req0.setName( new Dn( "uid=akarasulu,dc=example,dc=com" ) );
        req0.setSimple( true );
        req0.setVersion3( true );

        BindRequestImpl req1 = new BindRequestImpl();
        req1.setMessageId( 5 );
        req1.setCredentials( "password".getBytes() );
        req1.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req1.setSimple( true );
        req1.setVersion3( true );

        assertFalse( req0.equals( req1 ) );
    }
View Full Code Here

    public void testNotEqualDiffSimple() throws LdapException
    {
        BindRequestImpl req0 = new BindRequestImpl();
        req0.setMessageId( 5 );
        req0.setCredentials( "password".getBytes() );
        req0.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req0.setSimple( false );
        req0.setVersion3( true );

        BindRequestImpl req1 = new BindRequestImpl();
        req1.setMessageId( 5 );
        req1.setCredentials( "password".getBytes() );
        req1.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req1.setSimple( true );
        req1.setVersion3( true );

        assertFalse( req0.equals( req1 ) );
    }
View Full Code Here

    public void testNotEqualDiffVersion() throws LdapException
    {
        BindRequestImpl req0 = new BindRequestImpl();
        req0.setMessageId( 5 );
        req0.setCredentials( "password".getBytes() );
        req0.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req0.setSimple( true );
        req0.setVersion3( false );

        BindRequestImpl req1 = new BindRequestImpl();
        req1.setMessageId( 5 );
        req1.setCredentials( "password".getBytes() );
        req1.setName( new Dn( "cn=admin,dc=example,dc=com" ) );
        req1.setSimple( true );
        req1.setVersion3( true );

        assertFalse( req0.equals( req1 ) );
    }
View Full Code Here

        SearchResultDoneImpl response = new SearchResultDoneImpl( 45 );
        LdapResult result = response.getLdapResult();

        try
        {
            result.setMatchedDn( new Dn( "dc=example,dc=com" ) );
        }
        catch ( LdapException ine )
        {
            // do nothing
        }
View Full Code Here

            {
                LdapResultImpl result = new LdapResultImpl();

                try
                {
                    result.setMatchedDn( new Dn( "dc=example,dc=com" ) );
                }
                catch ( Exception e )
                {
                    // Do nothing
                }
View Full Code Here

    @Test
    public void testEqualsExactCopy() throws LdapException
    {
        AddRequestImpl req0 = new AddRequestImpl();
        req0.setMessageId( 5 );
        req0.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
        req0.setEntry( getEntry() );

        AddRequestImpl req1 = new AddRequestImpl();
        req1.setMessageId( 5 );
        req1.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
        req1.setEntry( getEntry() );

        assertTrue( req0.equals( req1 ) );
    }
View Full Code Here

    @Test
    public void testNotEqualDiffId() throws LdapException
    {
        AddRequestImpl req0 = new AddRequestImpl();
        req0.setMessageId( 7 );
        req0.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
        req0.setEntry( getEntry() );

        AddRequestImpl req1 = new AddRequestImpl();
        req1.setMessageId( 5 );
        req1.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );
        req1.setEntry( getEntry() );

        assertFalse( req0.equals( req1 ) );
    }
View Full Code Here

    public void testNotEqualDiffName() throws LdapException
    {
        AddRequestImpl req0 = new AddRequestImpl();
        req0.setMessageId( 5 );
        req0.setEntry( getEntry() );
        req0.setEntryDn( new Dn( "cn=admin,dc=example,dc=com" ) );

        AddRequestImpl req1 = new AddRequestImpl();
        req1.setMessageId( 5 );
        req1.setEntry( getEntry() );
        req1.setEntryDn( new Dn( "cn=admin,dc=apache,dc=org" ) );

        assertFalse( req0.equals( req1 ) );
    }
View Full Code Here

    public void testNotEqualDiffAttributes() throws LdapException
    {
        AddRequestImpl req0 = new AddRequestImpl();
        req0.setMessageId( 5 );
        Entry entry0 = getEntry();
        entry0.setDn( new Dn( "cn=admin,dc=apache,dc=org" ) );
        req0.setEntry( entry0 );

        AddRequestImpl req1 = new AddRequestImpl();
        req1.setMessageId( 5 );
        req1.setEntryDn( new Dn( "cn=admin,dc=apache,dc=org" ) );

        assertTrue( req0.equals( req1 ) );
        assertTrue( req1.equals( req0 ) );

        Entry entry1 = getEntry();
        entry1.setDn( new Dn( "cn=admin,dc=apache,dc=org" ) );
        req1.setEntry( entry1 );

        assertTrue( req0.equals( req1 ) );
        assertTrue( req1.equals( req0 ) );
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.name.Dn

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.