Package org.codehaus.dna.impl

Examples of org.codehaus.dna.impl.DefaultConfiguration


        final String name = "name";
        final String location = "";
        final String path = null;
        try
        {
            new DefaultConfiguration( name, location, path );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "path", npe.getMessage() );
            return;
View Full Code Here


    }

    public void testNullNameInSetAttribute()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "name", "", "" );
        try
        {
            configuration.setAttribute( null, "" );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "key", npe.getMessage() );
            return;
View Full Code Here

    }

    public void testNullValueInSetAttribute()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "name", "", "" );
        try
        {
            configuration.setAttribute( "", null );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "value", npe.getMessage() );
            return;
View Full Code Here

    }

    public void testNullValueInSetValue()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "name", "", "" );
        try
        {
            configuration.setValue( null );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "value", npe.getMessage() );
            return;
View Full Code Here

    }

    public void testNullChildinAddChild()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "name", "", "" );
        try
        {
            configuration.addChild( null );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "configuration", npe.getMessage() );
            return;
View Full Code Here

    }

    public void testNullNameInGetAttribute()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "name", "", "" );
        try
        {
            configuration.getAttribute( null );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "name", npe.getMessage() );
            return;
View Full Code Here

    }

    public void testNullNameInGetChild()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "name", "", "" );
        try
        {
            configuration.getChild( null, false );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "name", npe.getMessage() );
            return;
View Full Code Here

    }

    public void testNullNameInGetChildren()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "name", "", "" );
        try
        {
            configuration.getChildren( null );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "name", npe.getMessage() );
            return;
View Full Code Here

    }

    public void testGetValueAsText()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "myElement", "file.xml:20", "" );
        final String value = "blah";
        configuration.setValue( value );
        assertEquals( "getValue()", value, configuration.getValue() );
        assertEquals( "getValue('test')", value, configuration.getValue( "test" ) );
    }
View Full Code Here

    }

    public void testGetNullValueAsText()
        throws Exception
    {
        final DefaultConfiguration configuration =
            new DefaultConfiguration( "myElement", "file.xml:20", "" );
        assertEquals( "getValue('test')", "test", configuration.getValue( "test" ) );
        try
        {
            configuration.getValue();
        }
        catch( ConfigurationException e )
        {
            return;
        }
View Full Code Here

TOP

Related Classes of org.codehaus.dna.impl.DefaultConfiguration

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.