mirror of https://github.com/apache/maven.git
Updated unit tests with assertions.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@737619 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46ca604411
commit
dc27facb7e
|
@ -352,7 +352,6 @@ public class PomTransformer
|
|||
props.removeAll( removeProperties );
|
||||
|
||||
//Execution Rule - extension for this needs to be pushed into model-builder
|
||||
|
||||
dataSource = new DefaultModelDataSource( props, PomTransformer.MODEL_CONTAINER_FACTORIES );
|
||||
|
||||
for(ModelContainer mc : dataSource.queryFor( ProjectUri.Build.Plugins.Plugin.xUri ))
|
||||
|
|
|
@ -68,7 +68,7 @@ public class PomConstructionTest
|
|||
// them into a resolver, create the expression to extract the data to validate the Model, and the URI
|
||||
// to validate the properties. We also need a way to navigate from the Tex specification documents to
|
||||
// the test in question and vice versa. A little Eclipse plugin would do the trick.
|
||||
/*
|
||||
|
||||
public void testThatExecutionsWithoutIdsAreMergedAndTheChildWins()
|
||||
throws Exception
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ public class PomConstructionTest
|
|||
PomTestWrapper tester = new PomTestWrapper( model );
|
||||
assertModelEquals( tester, "child-descriptor", "build/plugins[1]/executions[1]/goals[1]" );
|
||||
}
|
||||
*/
|
||||
|
||||
public void testErroneousJoiningOfDifferentPluginsWithEqualDependencies()
|
||||
throws Exception
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ public class PomConstructionTest
|
|||
assertEquals( 1, ( (List<?>) pom.getValue( "build/plugins[1]/dependencies" ) ).size() );
|
||||
}
|
||||
|
||||
/** MNG-3821 -FIX---
|
||||
/** MNG-3821 FIX THIS
|
||||
public void testErroneousJoiningOfDifferentPluginsWithEqualExecutionIds()
|
||||
throws Exception
|
||||
{
|
||||
|
@ -111,18 +111,25 @@ public class PomConstructionTest
|
|||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "execution-configuration" );
|
||||
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/configuration" ) ).size() );
|
||||
}
|
||||
|
||||
public void testSingleConfigurationInheritance()
|
||||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "single-configuration-inheritance" );
|
||||
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/configuration[1]/rules" ) ).size() );
|
||||
assertEquals("2.0.6", pom.getValue( "build/plugins[1]/executions[1]/configuration[1]/rules[1]/requireMavenVersion[1]/version" ) );
|
||||
assertEquals("[2.0.6,)", pom.getValue( "build/plugins[1]/executions[1]/configuration[1]/rules[2]/requireMavenVersion[1]/version" ) );
|
||||
}
|
||||
|
||||
public void testConfigWithPluginManagement()
|
||||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "config-with-plugin-mng" );
|
||||
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||
assertEquals( "src/main/mdo/security.xml", pom.getValue( "build/plugins[1]/executions[1]/configuration[1]/model" ) );
|
||||
assertEquals( "1.0.8", pom.getValue( "build/plugins[1]/executions[2]/configuration[1]/version" ) );
|
||||
}
|
||||
|
||||
/** MNG-3965 */
|
||||
|
@ -130,6 +137,7 @@ public class PomConstructionTest
|
|||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "execution-configuration-subcollections" );
|
||||
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/configuration[1]/rules[1]/bannedDependencies" ) ).size() );
|
||||
}
|
||||
|
||||
/** MNG- */
|
||||
|
|
Loading…
Reference in New Issue