Examples of Ava


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

    @Test
    public void testAttributeTypeAndValueNullType() throws LdapException
    {
        try
        {
            new Ava( null, null, (String)null, (String)null );
            fail();
        }
        catch ( LdapException ine )
        {
            assertTrue( true );
View Full Code Here

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

    @Test
    public void testAttributeTypeAndValueInvalidType() throws LdapException
    {
        try
        {
            new Ava( "  ", " ", (String)null, (String)null );
            fail();
        }
        catch ( LdapException ine )
        {
            assertTrue( true );
View Full Code Here

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

     * Test a valid type for an AttributeTypeAndValue
     */
    @Test
    public void testAttributeTypeAndValueValidType() throws LdapException
    {
        Ava atav = new Ava( "A", "a", (String)null, (String)null );
        assertEquals( "a=", atav.toString() );
        assertEquals( "A=", atav.getUpName() );
       
        atav = new Ava( "  A  ", "a", (String)null, (String)null );
        assertEquals( "a=", atav.toString() );
        assertEquals( "  A  =", atav.getUpName() );
       
        atav = new Ava( "  A  ", null, (String)null, (String)null );
        assertEquals( "a=", atav.toString() );
        assertEquals( "  A  =", atav.getUpName() );
       
        atav = new Ava( null, "a", (String)null, (String)null );
        assertEquals( "a=", atav.toString() );
        assertEquals( "a=", atav.getUpName() );
       
    }
View Full Code Here

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

    @Test
    public void testLdapRDNEmpty()
    {
        try
        {
            new Ava( "", "", "", "" );
            fail( "Should not occurs ... " );
        }
        catch ( LdapException ine )
        {
            assertTrue( true );
View Full Code Here

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

     * test a simple AttributeTypeAndValue : a = b
     */
    @Test
    public void testLdapRDNSimple() throws LdapException
    {
        Ava atav = new Ava( "a", "a", "b", "b" );
        assertEquals( "a=b", atav.toString() );
        assertEquals( "a=b", atav.getUpName() );
        assertEquals( 0, atav.getStart() );
        assertEquals( 3, atav.getLength() );
    }
View Full Code Here

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

     * Compares two equals atavs
     */
    @Test
    public void testCompareToEquals() throws LdapException
    {
        Ava atav1 = new Ava( "a", "a","b", "b" );
        Ava atav2 = new Ava( "a", "a","b", "b" );

        assertEquals( 0, atav1.compareTo( atav2 ) );
    }
View Full Code Here

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

     * Compares two equals atavs but with a type in different case
     */
    @Test
    public void testCompareToEqualsCase() throws LdapException
    {
        Ava atav1 = new Ava( "a", "a", "b", "b" );
        Ava atav2 = new Ava( "A", "A", "b", "b" );

        assertEquals( 0, atav1.compareTo( atav2 ) );
    }
View Full Code Here

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

     * superior
     */
    @Test
    public void testCompareAtav1TypeSuperior() throws LdapException
    {
        Ava atav1 = new Ava( "b", "b", "b", "b" );
           
        Ava atav2 = new Ava( "a", "a", "b", "b" );

        assertEquals( 1, atav1.compareTo( atav2 ) );
    }
View Full Code Here

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

     * superior
     */
    @Test
    public void testCompareAtav2TypeSuperior() throws LdapException
    {
        Ava atav1 = new Ava( "a", "a", "b", "b" );
        Ava atav2 = new Ava( "b", "b", "b", "b" );

        assertEquals( -1, atav1.compareTo( atav2 ) );
    }
View Full Code Here

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

     * superior
     */
    @Test
    public void testCompareAtav1ValueSuperior() throws LdapException
    {
        Ava atav1 = new Ava( "a", "a", "b", "b" );
        Ava atav2 = new Ava( "a", "a", "a", "a" );

        assertEquals( 1, atav1.compareTo( atav2 ) );
    }
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.