Package org.codehaus.dna.tools.verifier

Examples of org.codehaus.dna.tools.verifier.ComponentVerifier


    }

    public void testVerifyDependencyOptionalValidThatPasses()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyDependencyOptionalValid( "true", issues );
        assertNoIssues( issues );
    }
View Full Code Here


    }

    public void testVerifyDependencyOptionalValidThatNoPasses()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyDependencyOptionalValid( "blah", issues );
        assertSingleIssue( issues,
                           "The dna.dependency attribute specifies " +
                           "optional parameter as \"blah\" that is not one " +
                           "of true or false.",
                           true, false );
View Full Code Here

    }

    public void testVerifyDependencyKeyConformsThatPassesWithQualifier()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyDependencyKeyConforms( "X", "X/X", issues );
        assertNoIssues( issues );
    }
View Full Code Here

    }

    public void testVerifyDependencyKeyConformsThatPassesWithoutQualifier()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyDependencyKeyConforms( "X", "X", issues );
        assertNoIssues( issues );
    }
View Full Code Here

    }

    public void testVerifyDependencyKeyConformsThatNoPasses()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyDependencyKeyConforms( "X", "blah", issues );
        assertSingleIssue( issues,
                           "The dna.dependency attribute specifies the key " +
                           "blah which does not conform to recomendation of " +
                           "(type)[/(qualifier)].",
                           false, false );
View Full Code Here

    }

    public void testVerifyDependencyTypeThatPasses()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyDependencyType( LifecycleExtendingService.class,
                                       ActionListener.class.getName(),
                                       issues );
        assertNoIssues( issues );
    }
View Full Code Here

    }

    public void testVerifyDependencyTypeThatNoPasses()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyDependencyType( LifecycleExtendingService.class,
                                       "INoExist!",
                                       issues );
        assertSingleIssue( issues,
                           "Unable to load dependency with type INoExist! " +
                           "for class. Reason: " +
View Full Code Here

    }

    public void testVerifyOptionalParameterThatPasses()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyOptionalParameter( "true", issues );
        assertNoIssues( issues );
    }
View Full Code Here

    }

    public void testVerifyOptionalParameterThatNoPasses()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        verifier.verifyOptionalParameter( null, issues );
        assertSingleIssue( issues,
                           "The dna.dependency attribute does not " +
                           "specify the parameter optional.",
                           true, false );
    }
View Full Code Here

    }

    public void testVerifyDependencyMetaDataThatPasses()
        throws Exception
    {
        final ComponentVerifier verifier = new ComponentVerifier();
        final List issues = new ArrayList();
        final Properties parameters = new Properties();
        parameters.setProperty( "optional", "false" );
        parameters.setProperty( "type", ActionListener.class.getName() );
        parameters.setProperty( "key", ActionListener.class.getName() );
        verifier.verifyDependencyMetaData( LifecycleExtendingService.class,
                                           new Attribute( "dna.dependency", parameters ),
                                           issues );
        assertNoIssues( issues );
    }
View Full Code Here

TOP

Related Classes of org.codehaus.dna.tools.verifier.ComponentVerifier

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.