Package org.apache.maven.project.harness

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


   
    /** MNG-3621 */
    public void testUncPath()
        throws Exception
    {
        PomTestWrapper pom = this.buildPom( "unc-path/sub" );
        assertEquals( "file:////host/site/test-child", pom.getValue( "distributionManagement/site/url" ) );
    }
View Full Code Here


   
    /** MNG-2006 */
    public void testUrlAppendWithChildPathAdjustment()
        throws Exception
    {
        PomTestWrapper pom = this.buildPom( "url-append/child" );
        assertEquals( "http://project.url/child", pom.getValue( "url" ) );
        assertEquals( "http://viewvc.project.url/child", pom.getValue( "scm/url" ) );
        assertEquals( "http://scm.project.url/child", pom.getValue( "scm/connection" ) );
        assertEquals( "https://scm.project.url/child", pom.getValue( "scm/developerConnection" ) );
        assertEquals( "http://site.project.url/child", pom.getValue( "distributionManagement/site/url" ) );
    }
View Full Code Here

    /** MNG-0479 */
    public void testRepoInheritance()
        throws Exception
    {
        PomTestWrapper pom = this.buildPom( "repo-inheritance" );
        assertEquals( 1, ( (List<?>) pom.getValue( "repositories" ) ).size() );
        assertEquals( "it0043", pom.getValue( "repositories[1]/name" ) );
    }  
View Full Code Here

    }  
   
    public void testEmptyScm()
        throws Exception
    {
        PomTestWrapper pom = this.buildPom( "empty-scm" );
        assertNull( pom.getValue( "scm" ) );
    }      
View Full Code Here

    }      
   
    public void testPluginConfigurationUsingAttributesWithoutPluginManagement()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "plugin-config-attributes/wo-plugin-mngt" );
        assertEquals( "src", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@todir" ) );
        assertEquals( "true", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@overwrite" ) );
        assertEquals( "target", pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@dir" ) );
        assertEquals( null, pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@todir" ) );
        assertEquals( null, pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@overwrite" ) );
    }
View Full Code Here

    /** MNG-4053*/
    public void testPluginConfigurationUsingAttributesWithPluginManagement()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "plugin-config-attributes/w-plugin-mngt" );
        assertEquals( "src", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@todir" ) );
        assertEquals( "true", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@overwrite" ) );
        assertEquals( "target", pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@dir" ) );
        assertEquals( null, pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@todir" ) );
        assertEquals( null, pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@overwrite" ) );
    }
View Full Code Here

    }

    public void testPluginConfigurationUsingAttributesWithPluginManagementAndProfile()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "plugin-config-attributes/w-profile", "maven-core-it" );
        assertEquals( "src", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@todir" ) );
        assertEquals( "true", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@overwrite" ) );
        assertEquals( "target", pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@dir" ) );
        assertEquals( null, pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@todir" ) );
        assertEquals( null, pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@overwrite" ) );
    }
View Full Code Here

    }

    public void testPomEncoding()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "pom-encoding/utf-8" );
        assertEquals( "TEST-CHARS: \u00DF\u0131\u03A3\u042F\u05D0\u20AC", pom.getValue( "description" ) );
        pom = buildPom( "pom-encoding/latin-1" );
        assertEquals( "TEST-CHARS: \u00C4\u00D6\u00DC\u00E4\u00F6\u00FC\u00DF", pom.getValue( "description" ) );
    }
View Full Code Here

    /* MNG-4070 */
    public void testXmlWhitespaceHandling()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "xml-whitespace/sub" );
        assertEquals( "org.apache.maven.its.mng4070", pom.getValue( "groupId" ) );
    }
View Full Code Here

    /* MNG-3760*/
    public void testInterpolationOfBaseUrl()
        throws Exception
    {
        PomTestWrapper pom = buildPom( "baseurl-interpolation/pom.xml" );
        assertEquals( pom.getBasedir().toURI().toString(), pom.getValue( "properties/prop1" ).toString() );
    }
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.