Package org.apache.rat.mp

Examples of org.apache.rat.mp.RatCheckMojo


    /**
     * Runs a check, which should expose no problems.
     * @throws Exception The test failed.
     */
    public void testIt1() throws Exception {
        final RatCheckMojo mojo = newRatCheckMojo( "it1" );
        final File ratTxtFile = getRatTxtFile(mojo);
        mojo.execute();
        checkResult( ratTxtFile, 1, 0 );
    }
View Full Code Here


    /**
     * Runs a check, which should detect a problem.
     * @throws Exception The test failed.
     */
    public void testIt2() throws Exception {
        final RatCheckMojo mojo = newRatCheckMojo( "it2" );
        final File ratTxtFile = getRatTxtFile(mojo);
        try
        {
            mojo.execute();
            fail( "Expected RatCheckException" );
        }
        catch ( RatCheckException e )
        {
            // Ok
View Full Code Here

   
    /**
     * Tests adding license headers.
     */
    public void testIt3() throws Exception {
        final RatCheckMojo mojo = (RatCheckMojo) newRatMojo( "it3", "check", true );
        setVariableValueToObject( mojo, "addLicenseHeaders", "true" );
        setVariableValueToObject( mojo, "numUnapprovedLicenses", Integer.valueOf(1));
        mojo.execute();
        final File ratTxtFile = getRatTxtFile( mojo );
        checkResult( ratTxtFile, 1, 1 );

        final File baseDir = new File( getBasedir() );
        final File sourcesDir = new File( new File( baseDir, "target/it-source" ), "it3" );
View Full Code Here

    /**
     * Verify it2 exception message contains report file name (RAT-127).
     */
    public void testIt4() throws Exception {
        final RatCheckMojo mojo = newRatCheckMojo( "it2" );
        try
        {
            mojo.execute();
            fail( "Expected RatCheckException" );
        }
        catch ( RatCheckException e )
        {
            final String msg = e.getMessage();
View Full Code Here

    /**
     * Runs a check, which should expose no problems.
     * @throws Exception The test failed.
     */
    public void testIt1() throws Exception {
        final RatCheckMojo mojo = newRatCheckMojo( "it1" );
        final File ratTxtFile = getRatTxtFile(mojo);
        mojo.execute();
        checkResult( ratTxtFile, 1, 0 );
    }
View Full Code Here

    /**
     * Runs a check, which should detect a problem.
     * @throws Exception The test failed.
     */
    public void testIt2() throws Exception {
        final RatCheckMojo mojo = newRatCheckMojo( "it2" );
        final File ratTxtFile = getRatTxtFile(mojo);
        try
        {
            mojo.execute();
            fail( "Expected RatCheckException" );
        }
        catch ( RatCheckException e )
        {
            // Ok
View Full Code Here

    /**
     * Runs a check, which should expose no problems.
     * @throws Exception The test failed.
     */
    public void testIt1() throws Exception {
        final RatCheckMojo mojo = newRatCheckMojo( "it1" );
        final File ratTxtFile = getRatTxtFile(mojo);
        mojo.execute();
        checkResult( ratTxtFile, 1, 0 );
    }
View Full Code Here

    /**
     * Runs a check, which should detect a problem.
     * @throws Exception The test failed.
     */
    public void testIt2() throws Exception {
        final RatCheckMojo mojo = newRatCheckMojo( "it2" );
        final File ratTxtFile = getRatTxtFile(mojo);
        try
        {
            mojo.execute();
            fail( "Expected RatCheckException" );
        }
        catch ( RatCheckException e )
        {
            // Ok
View Full Code Here

   
    /**
     * Tests adding license headers.
     */
    public void testIt3() throws Exception {
        final RatCheckMojo mojo = (RatCheckMojo) newRatMojo( "it3", "check", true );
        setVariableValueToObject( mojo, "addLicenseHeaders", "true" );
        setVariableValueToObject( mojo, "numUnapprovedLicenses", new Integer(1));
        mojo.execute();
        final File ratTxtFile = getRatTxtFile( mojo );
        checkResult( ratTxtFile, 1, 1 );

        final File baseDir = new File( getBasedir() );
        final File sourcesDir = new File( new File( baseDir, "target/it-source" ), "it3" );
View Full Code Here

    /**
     * Runs a check, which should expose no problems.
     * @throws Exception The test failed.
     */
    public void testIt1() throws Exception {
        final RatCheckMojo mojo = newRatCheckMojo( "it1" );
        final File ratTxtFile = getRatTxtFile(mojo);
        mojo.execute();
        checkResult( ratTxtFile, 1, 0 );
    }
View Full Code Here

TOP

Related Classes of org.apache.rat.mp.RatCheckMojo

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.