continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ken...@apache.org
Subject svn commit: r439590 - /maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Date Sat, 02 Sep 2006 13:34:22 GMT
Author: kenney
Date: Sat Sep  2 06:34:21 2006
New Revision: 439590

URL: http://svn.apache.org/viewvc?rev=439590&view=rev
Log:
Fixed test - the /tags in the scm url isn't present;
Added a test for a single project without modules.

Modified:
    maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java

Modified: maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=439590&r1=439589&r2=439590&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
(original)
+++ maven/continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Sat Sep  2 06:34:21 2006
@@ -233,6 +233,56 @@
 
     }
 
+    public void testCreateProjectWithoutModules()
+        throws Exception
+    {
+        ContinuumProjectBuilder projectBuilder = (ContinuumProjectBuilder) lookup( ContinuumProjectBuilder.ROLE,
+                                                                                   MavenTwoContinuumProjectBuilder.ID
);
+
+        URL url = getClass().getClassLoader().getResource( "projects/continuum/continuum-core/pom.xml"
);
+
+        // Eat System.out
+        PrintStream ps = System.out;
+
+        ContinuumProjectBuildingResult result;
+
+        try
+        {
+            System.setOut( new PrintStream( new ByteArrayOutputStream() ) );
+
+            result = projectBuilder.buildProjectsFromMetadata( url, null, null );
+        }
+        finally
+        {
+            System.setOut( ps );
+        }
+
+        assertNotNull( result );
+
+        assertNotNull( result.getErrors() );
+
+        assertEquals( 0, result.getErrors().size() );
+
+        assertNotNull( result.getProjectGroups() );
+
+        assertEquals( 1, result.getProjectGroups().size() );
+
+        ProjectGroup projectGroup = (ProjectGroup) result.getProjectGroups().get( 0 );
+
+        assertEquals( "projectGroup.groupId", "org.apache.maven.continuum", projectGroup.getGroupId()
);
+
+        assertEquals( "projectGroup.name", "Continuum Core", projectGroup.getName() );
+
+        assertNotNull( result.getProjects() );
+
+        assertEquals( 1, result.getProjects().size() );
+
+        assertNotNull( projectGroup.getProjects() );
+
+        assertEquals( 0, projectGroup.getProjects().size() );
+    }
+
+
     private void assertDependency( String dep, String proj, Map projects )
     {
         Project p = (Project) projects.get( proj );
@@ -272,7 +322,7 @@
 
         assertEquals( name, project.getName() );
 
-        String scmUrl = "scm:svn:http://svn.apache.org/repos/asf/maven/continuum/tags";
+        String scmUrl = "scm:svn:http://svn.apache.org/repos/asf/maven/continuum/";
 
         assertTrue( project.getScmUrl().startsWith( scmUrl ) );
     }



Mime
View raw message