Package org.apache.maven.project.harness

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


   
    /* MNG-1995 */
    public void testBooleanInterpolation()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "boolean-interpolation" );
        assertTrue ((Boolean) pom.getValue( "repositories[1]/releases/enabled" ) );    
        assertTrue((Boolean) pom.getValue( "build/resources[1]/filtering" ) );
    }   
View Full Code Here


   
    /* MNG-3899 */
    public void testBuildExtensionInheritance()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "build-extension-inheritance/sub" );
        assertEquals( 3, ( (List<?>) pom.getValue( "build/extensions" ) ).size() );
        assertEquals( "b", pom.getValue( "build/extensions[1]/artifactId" ) );
        assertEquals( "a", pom.getValue( "build/extensions[2]/artifactId" ) );
        assertEquals( "0.2", pom.getValue( "build/extensions[2]/version" ) );
        assertEquals( "c", pom.getValue( "build/extensions[3]/artifactId" ) );
    }
View Full Code Here

      throws Exception
  {
      Properties props = new Properties();
        props.put( "java.version", "1.5.0_15" );

        PomTestWrapper pom = buildPom( "jdk-activation", props );
        assertEquals( 3, pom.getMavenProject().getActiveProfiles().size() );
        assertEquals( "PASSED", pom.getValue( "properties/jdkProperty3" ) );
        assertEquals( "PASSED", pom.getValue( "properties/jdkProperty2" ) );
        assertEquals( "PASSED", pom.getValue( "properties/jdkProperty1" ) );
  }  
View Full Code Here

   
    /* MNG-2174 */
    public void testProfilePluginMngDependencies()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "profile-plugin-mng-dependencies/sub", "maven-core-it" );
        assertEquals( "a", pom.getValue( "build/plugins[1]/dependencies[1]/artifactId" ) );
    }   
View Full Code Here

   
    /** MNG-4116 */
    public void testPercentEncodedUrlsMustNotBeDecoded()
        throws Exception
    {
        PomTestWrapper pom = this.buildPom( "url-no-decoding" );
        assertEquals( "http://maven.apache.org/spacy%20path", pom.getValue( "url" ) );
        assertEquals( "http://svn.apache.org/viewvc/spacy%20path", pom.getValue( "scm/url" ) );
        assertEquals( "scm:svn:svn+ssh://svn.apache.org/spacy%20path", pom.getValue( "scm/connection" ) );
        assertEquals( "scm:svn:svn+ssh://svn.apache.org/spacy%20path", pom.getValue( "scm/developerConnection" ) );
        assertEquals( "http://issues.apache.org/spacy%20path", pom.getValue( "issueManagement/url" ) );
        assertEquals( "http://ci.apache.org/spacy%20path", pom.getValue( "ciManagement/url" ) );
        assertEquals( "scm:svn:svn+ssh://dist.apache.org/spacy%20path",
                      pom.getValue( "distributionManagement/repository/url" ) );
        assertEquals( "scm:svn:svn+ssh://snap.apache.org/spacy%20path",
                      pom.getValue( "distributionManagement/snapshotRepository/url" ) );
        assertEquals( "scm:svn:svn+ssh://site.apache.org/spacy%20path",
                      pom.getValue( "distributionManagement/site/url" ) );
    }   
View Full Code Here

    }   

    public void testPluginManagementInheritance()
        throws Exception
    {
        PomTestWrapper pom = this.buildPom( "plugin-management-inheritance" );
        assertEquals( "0.1-stub-SNAPSHOT",
                      pom.getValue( "build/pluginManagement/plugins[@artifactId='maven-compiler-plugin']/version" ) );
    }  
View Full Code Here

    }  
   
    public void testProfilePlugins()
      throws Exception
  {
        PomTestWrapper pom = this.buildPom( "profile-plugins", "standard" );
        assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins" ) ).size() );
        assertEquals( "maven-assembly2-plugin", pom.getValue( "build/plugins[2]/artifactId" ) );
  }      
View Full Code Here

  }      
   
    public void testPluginInheritanceSimple()
      throws Exception
  {
        PomTestWrapper pom = this.buildPom( "plugin-inheritance-simple/sub" );
      assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins" ) ).size() );  
  }
View Full Code Here

  }
   
    public void testPluginManagementDuplicate()
      throws Exception
  {
        PomTestWrapper pom = this.buildPom( "plugin-management-duplicate/sub" );
        assertEquals( 12, ( (List<?>) pom.getValue( "build/pluginManagement/plugins" ) ).size() );
  }
View Full Code Here

  }
   
    public void testDistributionManagement()
      throws Exception
  {
        PomTestWrapper pom = this.buildPom( "distribution-management" );
        assertEquals( "legacy", pom.getValue( "distributionManagement/repository/layout" ) );
  }     
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.