mirror of
https://github.com/apache/maven.git
synced 2025-02-07 02:29:10 +00:00
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 final DomainModel transformToDomainModel( List<ModelProperty> properties,
|
||||
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 void resolve( Artifact artifact )
|
||||
// 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 void testThatExecutionsWithoutIdsAreMergedAndTheChildWins()
|
||||
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 void testErroneousJoiningOfDifferentPluginsWithEqualDependencies()
|
||||
assertEquals( 1, ( (List<?>) pom.getValue( "build/plugins[1]/dependencies" ) ).size() );
|
||||
}
|
||||
|
||||
/** MNG-3821 -FIX---
|
||||
/** MNG-3821 FIX THIS
|
||||
public void testErroneousJoiningOfDifferentPluginsWithEqualExecutionIds()
|
||||
throws Exception
|
||||
{
|
||||
@ -105,24 +105,31 @@ public void testErroneousJoiningOfDifferentPluginsWithEqualExecutionIds()
|
||||
assertEquals( "maven-it-plugin-b", pom.getValue( "reporting/plugins[2]/artifactId" ) );
|
||||
assertEquals( 1, ( (List<?>) pom.getValue( "reporting/plugins[1]/reportSets" ) ).size() );
|
||||
}
|
||||
*/
|
||||
*/
|
||||
/** MNG-3998 */
|
||||
public void testExecutionConfiguration()
|
||||
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 void testExecutionConfigurationSubcollections()
|
||||
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…
x
Reference in New Issue
Block a user