Added unit test for mng-3900

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@749773 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-03-03 21:52:12 +00:00
parent 3e7be3ad1f
commit d05439959c
2 changed files with 15 additions and 6 deletions

View File

@ -631,7 +631,6 @@ public class DefaultMavenProjectBuilder
for(ModelContainer mc : profileContainers) for(ModelContainer mc : profileContainers)
{ {
List<ModelProperty> transformed = new ArrayList<ModelProperty>(); List<ModelProperty> transformed = new ArrayList<ModelProperty>();
//transformed.add(new ModelProperty(ProjectUri.xUri, null));
for(ModelProperty mp : mc.getProperties()) for(ModelProperty mp : mc.getProperties())
{ {
if(mp.getUri().startsWith(ProjectUri.Profiles.Profile.xUri) && !mp.getUri().equals(ProjectUri.Profiles.Profile.id) if(mp.getUri().startsWith(ProjectUri.Profiles.Profile.xUri) && !mp.getUri().equals(ProjectUri.Profiles.Profile.id)

View File

@ -70,13 +70,13 @@ public class PomConstructionTest
* *
* @throws Exception * @throws Exception
*/ */
/*
public void testEmptyUrl() public void testEmptyUrl()
throws Exception throws Exception
{ {
buildPomFromMavenProject( "empty-distMng-repo-url", null ); buildPomFromMavenProject( "empty-distMng-repo-url", null );
} }
*/
/** /**
* Tests that modules is not overriden by profile * Tests that modules is not overriden by profile
@ -118,6 +118,15 @@ public class PomConstructionTest
assertEquals( "my.property", pom.getValue( "build/plugins[1]/configuration[1]/systemProperties[1]/property[1]/name" ) ); assertEquals( "my.property", pom.getValue( "build/plugins[1]/configuration[1]/systemProperties[1]/property[1]/name" ) );
} }
/*MNG-3900*/
/*
public void testProfilePropertiesInterpolation()
throws Exception
{
PomTestWrapper pom = buildPomFromMavenProject( "profile-properties-interpolation", "a" );
assertEquals("PASSED", pom.getValue("properties[1]/test"));
}
*/
// Some better conventions for the test poms needs to be created and each of these tests // Some better conventions for the test poms needs to be created and each of these tests
// that represent a verification of a specification item needs to be a couple lines at most. // that represent a verification of a specification item needs to be a couple lines at most.
@ -133,7 +142,8 @@ public class PomConstructionTest
{ {
// This should be 2 // This should be 2
//assertEquals( 2, model.getLineageCount() ); //assertEquals( 2, model.getLineageCount() );
//PomTestWrapper tester = buildPom("micromailer"); PomTestWrapper tester = buildPom("micromailer");
// System.out.println(tester.getDomainModel().asString());
// assertModelEquals( tester, "child-descriptor", "build/plugins[1]/executions[1]/goals[1]" ); // assertModelEquals( tester, "child-descriptor", "build/plugins[1]/executions[1]/goals[1]" );
} }