Package org.apache.maven.project.harness

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


  }     
   
    public void testDependencyScopeInheritance()
      throws Exception
  {
        PomTestWrapper pom = buildPom( "dependency-scope-inheritance/sub" );
        String scope = (String) pom.getValue( "dependencies[1]/scope" );
        assertEquals( "compile", scope );
  }  
View Full Code Here


  }  
   
    public void testDependencyScope()
      throws Exception
  {
      PomTestWrapper pom = buildPom( "dependency-scope/sub" );
  }  
View Full Code Here

    //This will fail on a validation error if incorrect
    public void testDependencyManagementWithInterpolation()
      throws Exception
  {
      PomTestWrapper pom = buildPom( "dependency-management-with-interpolation/sub" );
  }  
View Full Code Here

    public void testInterpolationWithSystemProperty()
        throws Exception
    {
        Properties sysProps = new Properties();
        sysProps.setProperty( "system.property", "PASSED" );
        PomTestWrapper pom = buildPom( "sytem-property-interpolation", sysProps );
        assertEquals( "PASSED", pom.getValue( "name" ) );
    }   
View Full Code Here

    /* MNG-4129 */
    public void testPluginExecutionInheritanceWhenChildDoesNotDeclarePlugin()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "plugin-exec-inheritance/wo-merge" );
        List<PluginExecution> executions =
            (List<PluginExecution>) pom.getValue( "build/pluginsAsMap[@name='org.apache.maven.its.plugins:maven-it-plugin-log-file']/executions" );
        assertEquals( 1, executions.size() );
        assertEquals( "inherited-execution", executions.get( 0 ).getId() );
    }
View Full Code Here

    }

    public void testPluginExecutionInheritanceWhenChildDoesDeclarePluginAsWell()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "plugin-exec-inheritance/w-merge" );
        List<PluginExecution> executions =
            (List<PluginExecution>) pom.getValue( "build/pluginsAsMap[@name='org.apache.maven.its.plugins:maven-it-plugin-log-file']/executions" );
        assertEquals( 1, executions.size() );
        assertEquals( "inherited-execution", executions.get( 0 ).getId() );
    }   
View Full Code Here

    /** MNG-3843 */
    public void testPrerequisitesAreNotInherited()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "prerequisites-inheritance/child" );
        assertSame( null, pom.getValue( "prerequisites" ) );
    }   
View Full Code Here

    }   

    public void testLicensesAreInheritedButNotAggregated()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "licenses-inheritance/child-2" );
        assertEquals( 1, ( (List<?>) pom.getValue( "licenses" ) ).size() );
        assertEquals( "child-license", pom.getValue( "licenses[1]/name" ) );
        assertEquals( "http://child.url/license", pom.getValue( "licenses[1]/url" ) );
    }   
View Full Code Here

    }   

    public void testDevelopersAreInheritedButNotAggregated()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "developers-inheritance/child-2" );
        assertEquals( 1, ( (List<?>) pom.getValue( "developers" ) ).size() );
        assertEquals( "child-developer", pom.getValue( "developers[1]/name" ) );
    }
View Full Code Here

    }

    public void testContributorsAreInheritedButNotAggregated()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "contributors-inheritance/child-2" );
        assertEquals( 1, ( (List<?>) pom.getValue( "contributors" ) ).size() );
        assertEquals( "child-contributor", pom.getValue( "contributors[1]/name" ) );
    }   
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.