Package com.mathieucarbou.mojo.license

Examples of com.mathieucarbou.mojo.license.LicenseCheckMojo


public class LicenseCheckMojoTest
{
    @Test(expectedExceptions = MojoFailureException.class)
    public void test_execution() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = new File("src/etc/header.txt");
            }
        };
        mojo.execute();
    }
View Full Code Here


    }

    @Test
    public void test_execution_quiet() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = new File("src/etc/header.txt");
                super.quiet = true;
                super.failIfMissing = false;
            }
        };
        mojo.execute();
    }
View Full Code Here

    }

    @Test
    public void test_execution_no_mapping() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = new File("src/etc/header.txt");
                super.useDefaultMapping = false;
            }
        };
        mojo.execute();
    }
View Full Code Here

    }

    @Test(expectedExceptions = IllegalArgumentException.class)
    public void test_execution_bad_header() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = new File("src/etc/header_bad.txt");
            }
        };
        mojo.execute();
    }
View Full Code Here

public class LicenseCheckMojoTest
{
    @Test(expectedExceptions = MojoFailureException.class)
    public void test_execution() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = "src/etc/header.txt";
            }
        };
        mojo.execute();
    }
View Full Code Here

    }

    @Test
    public void test_execution_quiet() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = "src/etc/header.txt";
                super.quiet = true;
                super.failIfMissing = false;
            }
        };
        mojo.execute();
    }
View Full Code Here

    }

    @Test
    public void test_execution_no_mapping() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = "src/etc/header.txt";
                super.useDefaultMapping = false;
            }
        };
        mojo.execute();
    }
View Full Code Here

    }

    @Test(expectedExceptions = InvalidResourceException.class)
    public void test_execution_bad_header() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = "src/etc/header_bad.txt";
            }
        };
        mojo.execute();
    }
View Full Code Here

    }

    @Test(expectedExceptions = MojoFailureException.class)
    public void test_execution_url_file_system() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File("src/test/project");
                super.header = "documents/header.txt";
            }
        };
        mojo.execute();
    }
View Full Code Here

    }
   
    @Test(expectedExceptions = MojoFailureException.class)
    public void test_execution_url_classpath() throws Exception
    {
        LicenseCheckMojo mojo = new LicenseCheckMojo()
        {
            {
                super.basedir = new File(".");
                super.header = "header.txt"; // locate in test/resources
            }
        };
        mojo.execute();
    }
View Full Code Here

TOP

Related Classes of com.mathieucarbou.mojo.license.LicenseCheckMojo

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.