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

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


    {
        StringValue csv = new StringValue( ( String ) null );

        assertNull( csv.getValue() );
        assertFalse( csv.isSchemaAware() );
        assertTrue( csv.isValid( new Ia5StringSyntaxChecker() ) );
        assertTrue( csv.isNull() );
        assertNull( csv.getNormValue() );
    }
View Full Code Here


        StringValue csv = new StringValue( "" );

        assertNotNull( csv.getValue() );
        assertEquals( "", csv.getString() );
        assertFalse( csv.isSchemaAware() );
        assertTrue( csv.isValid( new Ia5StringSyntaxChecker() ) );
        assertFalse( csv.isNull() );
        assertNotNull( csv.getNormValue() );
        assertEquals( "", csv.getNormValue() );
    }
View Full Code Here

    {
        StringValue csv = new StringValue( "test" );

        assertEquals( "test", csv.getValue() );
        assertFalse( csv.isSchemaAware() );
        assertTrue( csv.isValid( new Ia5StringSyntaxChecker() ) );
        assertFalse( csv.isNull() );
        assertNotNull( csv.getNormValue() );
        assertEquals( "test", csv.getNormValue() );
    }
View Full Code Here

    {
        StringValue sv = new StringValue( ( String ) null );

        assertNull( sv.getValue() );
        assertFalse( sv.isSchemaAware() );
        assertTrue( sv.isValid( new Ia5StringSyntaxChecker() ) );
        assertTrue( sv.isNull() );

        sv = new StringValue( "" );
        assertNotNull( sv.getValue() );
        assertEquals( "", sv.getValue() );
        assertFalse( sv.isSchemaAware() );
        assertTrue( sv.isValid( new Ia5StringSyntaxChecker() ) );
        assertFalse( sv.isNull() );

        sv = new StringValue( "Test" );
        assertNotNull( sv.getValue() );
        assertEquals( "Test", sv.getValue() );
        assertFalse( sv.isSchemaAware() );
        assertTrue( sv.isValid( new Ia5StringSyntaxChecker() ) );
        assertFalse( sv.isNull() );
    }
View Full Code Here

    @Test
    public void testIsValid() throws LdapException
    {
        StringValue sv = new StringValue( "Test" );

        assertTrue( sv.isValid( new Ia5StringSyntaxChecker() ) );

        sv = new StringValue( "é" );
        assertFalse( sv.isValid( new Ia5StringSyntaxChecker() ) );
    }
View Full Code Here

    @Test
    public void testSerializeStandard() throws LdapException, IOException, ClassNotFoundException
    {
        StringValue csv = new StringValue( "TEST" );
        csv.apply( at );
        csv.isValid( new Ia5StringSyntaxChecker() );

        StringValue csvSer = deserializeValue( at, serializeValue( csv ) );
        assertNotSame( csv, csvSer );
        assertEquals( csv.getValue(), csvSer.getValue() );
        assertEquals( csv.getNormValue(), csvSer.getNormValue() );
View Full Code Here

     */
    @Test
    public void testSerializeNotNormalized() throws LdapException, IOException, ClassNotFoundException
    {
        StringValue csv = new StringValue( "Test" );
        csv.isValid( new Ia5StringSyntaxChecker() );

        StringValue csvSer = deserializeValue( null, serializeValue( csv ) );
        assertNotSame( csv, csvSer );
        assertEquals( csv.getValue(), csvSer.getValue() );
        assertEquals( csv.getValue(), csvSer.getNormValue() );
View Full Code Here

     */
    @Test
    public void testSerializeEmptyNormalized() throws LdapException, IOException, ClassNotFoundException
    {
        StringValue csv = new StringValue( "  " );
        csv.isValid( new Ia5StringSyntaxChecker() );
        csv.apply( at );

        StringValue csvSer = deserializeValue( at, serializeValue( csv ) );
        assertNotSame( csv, csvSer );
        assertEquals( csv.getValue(), csvSer.getValue() );
View Full Code Here

     */
    @Test
    public void testSerializeNullValue() throws LdapException, IOException, ClassNotFoundException
    {
        StringValue csv = new StringValue( ( String ) null );
        csv.isValid( new Ia5StringSyntaxChecker() );
        csv.apply( at );

        StringValue csvSer = deserializeValue( at, serializeValue( csv ) );
        assertNotSame( csv, csvSer );
        assertEquals( csv.getValue(), csvSer.getValue() );
View Full Code Here

     */
    @Test
    public void testSerializeEmptyValue() throws LdapException, IOException, ClassNotFoundException
    {
        StringValue csv = new StringValue( "" );
        csv.isValid( new Ia5StringSyntaxChecker() );
        csv.apply( at );

        StringValue csvSer = deserializeValue( at, serializeValue( csv ) );
        assertNotSame( csv, csvSer );
        assertEquals( csv.getValue(), csvSer.getValue() );
View Full Code Here

TOP

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

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.