Package org.apache.maven.project.harness

Examples of org.apache.maven.project.harness.PomTestWrapper


    /* MNG-3811*/
    public void testReportingPluginConfig()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "reporting-plugin-config/sub" );

        assertEquals( 2, ( (List<?>) pom.getValue( "reporting/plugins[1]/configuration/stringParams" ) ).size() );
        assertEquals( "parentParam", pom.getValue( "reporting/plugins[1]/configuration/stringParams[1]/stringParam[1]" ) );
        assertEquals( "childParam", pom.getValue( "reporting/plugins[1]/configuration/stringParams[1]/stringParam[2]" ) );
        assertEquals( "true", pom.getValue( "reporting/plugins[1]/configuration/booleanParam" ) );
    }   
View Full Code Here


    }   
   
    public void testPropertiesNoDuplication()
      throws Exception
    {
      PomTestWrapper pom = buildPom( "properties-no-duplication/sub" )
        assertEquals( 1, ( (Properties) pom.getValue( "properties" ) ).size() );
        assertEquals( "child", pom.getValue( "properties/pomProfile" ) );
    }
View Full Code Here

    }

    public void testPomInheritance()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "pom-inheritance/sub" );
        assertEquals( "parent-description", pom.getValue( "description" ) );
        assertEquals( "jar", pom.getValue( "packaging" ) );
    }
View Full Code Here

    }

    public void testCompleteModelWithoutParent()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "complete-model/wo-parent" );

        testCompleteModel( pom );
    }
View Full Code Here

    }

    public void testCompleteModelWithParent()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "complete-model/w-parent/sub" );

        testCompleteModel( pom );
    }
View Full Code Here

    /* MNG-2309*/

    public void testProfileInjectionOrder()
        throws Exception
    {
        PomTestWrapper pom =
            buildPom( "profile-injection-order", "pom-a", "pom-b", "pom-e", "pom-c", "pom-d" );
        assertEquals( "e", pom.getValue( "properties[1]/pomProperty" ) );
    }
View Full Code Here

    }

    public void testPropertiesInheritance()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "properties-inheritance/sub" );
        assertEquals( "parent-property", pom.getValue( "properties/parentProperty" ) );
        assertEquals( "child-property", pom.getValue( "properties/childProperty" ) );
        assertEquals( "child-override", pom.getValue( "properties/overriddenProperty" ) );
    }
View Full Code Here

    /* MNG-4102*/
    public void testInheritedPropertiesInterpolatedWithValuesFromChildWithoutProfiles()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "inherited-properties-interpolation/no-profile/sub" );

        assertEquals( "CHILD", pom.getValue( "properties/overridden" ) );
        assertEquals( "CHILD", pom.getValue( "properties/interpolated" ) );
    }
View Full Code Here

    /* MNG-4102 */
    public void testInheritedPropertiesInterpolatedWithValuesFromChildWithActiveProfiles()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "inherited-properties-interpolation/active-profile/sub" );

        assertEquals( 1, pom.getMavenProject().getModel().getProfiles().size() );

        buildPom( "inherited-properties-interpolation/active-profile/sub", "it-parent", "it-child" );
        assertEquals( "CHILD", pom.getValue( "properties/overridden" ) );
        assertEquals( "CHILD", pom.getValue( "properties/interpolated" ) );
    }
View Full Code Here

   
    /* MNG-3545 */
    public void testProfileDefaultActivation()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "profile-default-deactivation", "profile4" );
        assertEquals( 1, pom.getMavenProject().getActiveProfiles().size() );
        assertEquals( 1, ( (List<?>) pom.getValue( "build/plugins" ) ).size() );
        assertEquals( "2.1", pom.getValue( "build/plugins[1]/version" ) );
    }   
View Full Code Here

TOP

Related Classes of org.apache.maven.project.harness.PomTestWrapper

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.