continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r726463 - in /continuum/trunk: ./ continuum-core/src/test/java/org/apache/maven/continuum/AddMaven2ProjectTest.java continuum-docs/src/site/xdoc/
Date Sun, 14 Dec 2008 15:14:12 GMT
Author: olamy
Date: Sun Dec 14 07:14:12 2008
New Revision: 726463

URL: http://svn.apache.org/viewvc?rev=726463&view=rev
Log:
 merge -r 726461:726462 from 1.2.x branch
[CONTINUUM-1953] add comment in the unit test


Modified:
    continuum/trunk/   (props changed)
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AddMaven2ProjectTest.java
    continuum/trunk/continuum-docs/src/site/xdoc/   (props changed)

Propchange: continuum/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 14 07:14:12 2008
@@ -1 +1 @@
-/continuum/branches/continuum-1.2.x:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024,725845,726103,726239
+/continuum/branches/continuum-1.2.x:690684,690689-690799,698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024,725845,726103,726239,726462

Modified: continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AddMaven2ProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AddMaven2ProjectTest.java?rev=726463&r1=726462&r2=726463&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AddMaven2ProjectTest.java
(original)
+++ continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/AddMaven2ProjectTest.java
Sun Dec 14 07:14:12 2008
@@ -69,7 +69,7 @@
     
     
     
-    public void testAddProjectWithBuildDefTemplateToExistingGroup()
+    public void testAddProjectToExistingGroupWithBuildDefTemplate()
         throws Exception
     {
 
@@ -79,6 +79,10 @@
         getContinuum().addProjectGroup( pg );
         pg = getContinuum().getAllProjectGroups().get( 1 );
         assertEquals( 2, getContinuum().getAllProjectGroups().size() );
+        pg = getContinuum().getProjectGroupWithBuildDetails( pg.getId() );
+        // group created with the m2 default build def 
+        assertEquals( 1, pg.getBuildDefinitions().size() );
+        
 
         File rootPom = getTestFile( "src/test/resources/projects/continuum/continuum-core/pom.xml"
);
 
@@ -97,11 +101,12 @@
         assertNotNull( project );
         pg = getContinuum().getProjectGroupWithBuildDetails( pg.getId() );
         log.info( "project buildDef list size : " + project.getBuildDefinitions().size()
);
+        // project with the build def coming from template
         assertEquals( 1, project.getBuildDefinitions().size() );
         assertEquals( "clean deploy", ( (BuildDefinition) project.getBuildDefinitions().get(
0 ) ).getGoals() );
     }
     
-    public void testAddProjectWithBuildDefTemplateWithGroupCreation()
+    public void testAddProjectWithGroupCreationWithBuildDefTemplate()
         throws Exception
     {
 
@@ -117,10 +122,13 @@
         assertNotNull( result );
 
         assertEquals( 1, result.getProjects().size() );
-
         Project project = result.getProjects().get( 0 );
         assertNotNull( project );
+        project = getContinuum().getProjectWithBuildDetails( project.getId() );
         log.info( "project buildDef list size : " + project.getBuildDefinitions().size()
);
+        // build def only at the group level du to group creation 
+        assertEquals( 0, project.getBuildDefinitions().size() );
+        
         log.info( "all pg size " + getContinuum().getAllProjectGroups().size() );
         ProjectGroup pg = result.getProjectGroups().get( 0 );
 
@@ -128,7 +136,7 @@
 
         log.info( " pg groupId " + pg.getGroupId() );
         //@ group level the db from template must be used
-        log.info( " mg builddefs size " + pg.getBuildDefinitions().size() );
+        log.info( " pg builddefs size " + pg.getBuildDefinitions().size() );
         log.info( "pg bd goals " + ( (BuildDefinition) pg.getBuildDefinitions().get( 0 )
).getGoals() );
         assertEquals( "clean deploy", ( (BuildDefinition) pg.getBuildDefinitions().get( 0
) ).getGoals() );
         
@@ -153,7 +161,13 @@
 
         Project project = result.getProjects().get( 0 );
         assertNotNull( project );
+        
+        assertNotNull( project );
+        project = getContinuum().getProjectWithBuildDetails( project.getId() );
         log.info( "project buildDef list size : " + project.getBuildDefinitions().size()
);
+        // only build def at group level
+        assertEquals( 0, project.getBuildDefinitions().size() );
+        
         log.info( "all pg size " + getContinuum().getAllProjectGroups().size() );
         ProjectGroup pg = result.getProjectGroups().get( 0 );
 
@@ -170,7 +184,6 @@
 
     }       
 
-
     public void testAddProjectToExistingGroupDefaultBuildDef()
         throws Exception
     {

Propchange: continuum/trunk/continuum-docs/src/site/xdoc/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Dec 14 07:14:12 2008
@@ -1,2 +1,2 @@
-/continuum/branches/continuum-1.2.x/continuum-docs/src/site/xdoc:698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024,725845,726103,726239
+/continuum/branches/continuum-1.2.x/continuum-docs/src/site/xdoc:698449-698533,698817-698819,699529,700250,700273,700936,705894,705910,708339,722279,722624,723119,723487,724016,724024,725845,726103,726239,726462
 /continuum/trunk/continuum-docs/src/site/xdoc:690494-690520



Mime
View raw message