Examples of MavenProjectStub


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

        check.execute();
    }

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

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

        check.execute();
    }

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

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

*/
public final class CheckTest {

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

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

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

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

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

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

*/
public final class StrictTest {

    @Test
    public void test_strict() throws Exception {
        MavenProjectStub project = new MavenProjectStub();

        /*LicenseFormatMojo format = new LicenseFormatMojo();
        format.basedir = new File("src/test/resources/check/issue76");
        format.header = "src/test/resources/test-header1.txt";
        format.project = project;
View Full Code Here

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

        assertEquals(check.missingHeaders.size(), 4);
    }

    @Test
    public void test_space() throws Exception {
        MavenProjectStub project = new MavenProjectStub();

        /*LicenseFormatMojo format = new LicenseFormatMojo();
        format.basedir = new File("src/test/resources/check/strict");
        format.header = "src/test/resources/test-header1-diff.txt";
        format.project = project;
View Full Code Here

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

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

        MockedLog logger = new MockedLog();
        check.setLog(new DefaultLog(logger));
View Full Code Here

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

    @Test
    public void test_additionalHeaderDefinitions() throws Exception {
        LicenseCheckMojo check = new LicenseCheckMojo();
        check.basedir = new File("src/test/resources/check/def");
        check.header = "src/test/resources/check/header.txt";
        check.project = new MavenProjectStub();
        check.excludes = new String[]{"*.xml"};
        check.strictCheck = true;

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

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

* @author Mathieu Carbou (mathieu.carbou@gmail.com)
*/
public final class AggregateMojoTest {
    @Test
    public void test_modules_ignored() throws Exception {
        MavenProjectStub project = new MavenProjectStub() {
            @Override
            public List getModules() {
                return Arrays.<String>asList("module1", "module2", "module3");
            }
        };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.