Package org.apache.maven.plugin.testing

Examples of org.apache.maven.plugin.testing.ParametersMojo


    public void testDefault()
        throws Exception
    {
        MavenProject project = readMavenProject( new File( "src/test/projects/default" ) );

        ParametersMojo mojo = (ParametersMojo) lookupConfiguredMojo( project, "parameters" );

        assertNull( mojo.plain );
        assertNull( mojo.withProperty );
        assertEquals( "default", mojo.withDefault );
        assertEquals( "default", mojo.withPropertyAndDefault );
View Full Code Here


    public void testExplicit()
        throws Exception
    {
        MavenProject project = readMavenProject( new File( "src/test/projects/explicit" ) );

        ParametersMojo mojo = (ParametersMojo) lookupConfiguredMojo( project, "parameters" );

        assertEquals( "explicitValue", mojo.plain );
        assertEquals( "explicitWithPropertyValue", mojo.withProperty );
        assertEquals( "explicitWithDefaultValue", mojo.withDefault );
        assertEquals( "explicitWithPropertyAndDefaultValue", mojo.withPropertyAndDefault );
View Full Code Here

        MavenProject project = readMavenProject( new File( "src/test/projects/default" ) );
        MavenSession session = newMavenSession( project );
        MojoExecution execution = newMojoExecution( "parameters" );

        session.getUserProperties().put( "property", "propertyValue" );
        ParametersMojo mojo = (ParametersMojo) lookupConfiguredMojo( session, execution );

        assertNull( mojo.plain );
        assertEquals( "propertyValue", mojo.withProperty );
        assertEquals( "default", mojo.withDefault );
        assertEquals( "propertyValue", mojo.withPropertyAndDefault );
View Full Code Here

        MavenProject project = readMavenProject( new File( "src/test/projects/explicit" ) );
        MavenSession session = newMavenSession( project );
        MojoExecution execution = newMojoExecution( "parameters" );

        session.getUserProperties().put( "property", "propertyValue" );
        ParametersMojo mojo = (ParametersMojo) lookupConfiguredMojo( session, execution );

        assertEquals( "explicitValue", mojo.plain );
        assertEquals( "explicitWithPropertyValue", mojo.withProperty );
        assertEquals( "explicitWithDefaultValue", mojo.withDefault );
        assertEquals( "explicitWithPropertyAndDefaultValue", mojo.withPropertyAndDefault );
View Full Code Here

TOP

Related Classes of org.apache.maven.plugin.testing.ParametersMojo

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.