Fixed path problem on unit test.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@742760 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Britton Isbell 2009-02-09 22:00:52 +00:00
parent 1b36ff52dd
commit 6032251645
1 changed files with 15 additions and 4 deletions

View File

@ -213,11 +213,12 @@ public class PomConstructionTest
{ {
PomTestWrapper pom = buildPomFromMavenProject( "reporting-interpolation", null ); PomTestWrapper pom = buildPomFromMavenProject( "reporting-interpolation", null );
pom = new PomTestWrapper(pom.getMavenProject()); pom = new PomTestWrapper(pom.getMavenProject());
assertEquals( System.getProperty("user.dir") assertEquals( createPath(Arrays.asList(System.getProperty("user.dir"),
+ "/src/test/resources-project-builder/reporting-interpolation/target/site", "src", "test", "resources-project-builder", "reporting-interpolation", "target", "site")),
pom.getValue( "reporting/outputDirectory" ) ); pom.getValue( "reporting/outputDirectory" ) );
} }
public void testPluginOrder() public void testPluginOrder()
throws Exception throws Exception
{ {
@ -918,4 +919,14 @@ public class PomConstructionTest
artifact.setFile( artifacts.get( id ) ); artifact.setFile( artifacts.get( id ) );
} }
} }
private static String createPath(List<String> elements)
{
StringBuffer buffer = new StringBuffer();
for(String s : elements)
{
buffer.append(s).append(File.separator);
}
return buffer.toString().substring(0, buffer.toString().length() - 1);
}
} }