Package org.apache.maven.plugin.testing.stubs

Examples of org.apache.maven.plugin.testing.stubs.MavenProjectStub


        check.execute();
    }

    @Test
    public void test_modules_scanned() throws Exception {
        MavenProjectStub project = new MavenProjectStub() {
            @Override
            public List getModules() {
                return Arrays.<String>asList("module1", "module2", "module3");
            }
        };
View Full Code Here


    @Test
    public void test_not_useDefaultMapping() throws Exception {
        LicenseCheckMojo check = new LicenseCheckMojo();
        check.basedir = new File("src/test/resources/check");
        check.header = "header.txt";
        check.project = new MavenProjectStub();
        check.useDefaultMapping = false;
        check.strictCheck = true;
        MockedLog logger = new MockedLog();
        check.setLog(new DefaultLog(logger));
        check.execute();
View Full Code Here

    @Test
    public void test_useDefaultMapping() throws Exception {
        LicenseCheckMojo check = new LicenseCheckMojo();
        check.basedir = new File("src/test/resources/check");
        check.header = "header.txt";
        check.project = new MavenProjectStub();
        check.useDefaultMapping = true;
        check.strictCheck = true;
        MockedLog logger = new MockedLog();
        check.setLog(new DefaultLog(logger));
        try {
View Full Code Here

        LicenseCheckMojo check = new LicenseCheckMojo();
        MockedLog logger = new MockedLog();
        check.setLog(new DefaultLog(logger));
        check.basedir = new File("src/test/resources/check");
        check.header = "header.txt";
        check.project = new MavenProjectStub();
        check.useDefaultMapping = true;
        check.strictCheck = true;

        try {
            check.execute();
View Full Code Here

    @Test(expectedExceptions = MojoExecutionException.class)
    public void test_no_exclusions() throws Exception {
        LicenseCheckMojo check = new LicenseCheckMojo();
        check.basedir = new File("src/test/resources/check");
        check.header = "header.txt";
        check.project = new MavenProjectStub();
        check.excludes = new String[0];
        check.strictCheck = true;
        check.execute();
    }
View Full Code Here

    @Test
    public void test_exclusions() throws Exception {
        LicenseCheckMojo check = new LicenseCheckMojo();
        check.basedir = new File("src/test/resources/check");
        check.header = "header.txt";
        check.project = new MavenProjectStub();
        check.excludes = new String[]{"**/*.txt", "**/*.xml", "**/*.java"};
        check.strictCheck = true;
        check.execute();
    }
View Full Code Here

    public void test_include_and_fail() throws Exception {
        try {
            LicenseCheckMojo check = new LicenseCheckMojo();
            check.basedir = new File("src/test/resources/check");
            check.header = "header.txt";
            check.project = new MavenProjectStub();
            check.excludes = new String[]{"doc1.txt"};
            check.useDefaultExcludes = false;
            check.strictCheck = true;
            check.execute();
        } catch (Exception e) {
View Full Code Here

        format.execute();*/

        LicenseCheckMojo check = new LicenseCheckMojo();
        check.basedir = new File("src/test/resources/check/valid");
        check.header = "src/test/resources/test-header1.txt";
        check.project = new MavenProjectStub();
        check.strictCheck = true;
        try {
            check.execute();
            fail();
        } catch (MojoExecutionException e) {
View Full Code Here

*/
public final class HeaderMojoTest {

    @Test
    public void test_create() throws Exception {
        MavenProjectStub project = new MavenProjectStub();
        LicenseCheckMojo check = new LicenseCheckMojo();
        check.basedir = new File("src/main/resources/check");
        check.project = project;
        check.strictCheck = true;
        check.execute();
View Full Code Here

        check.execute();
    }

    @Test
    public void test_load_header_from_relative_file() throws Exception {
        MavenProjectStub project = new MavenProjectStub();
        LicenseCheckMojo check = new LicenseCheckMojo();
        check.basedir = new File("src/test/resources/check");
        check.header = "header.txt";
        check.project = project;
        check.failIfMissing = false;
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.testing.stubs.MavenProjectStub

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.