You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by tr...@apache.org on 2005/07/23 20:21:53 UTC
svn commit: r224494 - in /maven/continuum/trunk/continuum-xmlrpc: pom.xml
src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java
Author: trygvis
Date: Sat Jul 23 11:21:48 2005
New Revision: 224494
URL: http://svn.apache.org/viewcvs?rev=224494&view=rev
Log:
o Using continuum-test.
Modified:
maven/continuum/trunk/continuum-xmlrpc/pom.xml
maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java
Modified: maven/continuum/trunk/continuum-xmlrpc/pom.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/pom.xml?rev=224494&r1=224493&r2=224494&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/pom.xml (original)
+++ maven/continuum/trunk/continuum-xmlrpc/pom.xml Sat Jul 23 11:21:48 2005
@@ -18,6 +18,10 @@
<artifactId>continuum-core</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-test</artifactId>
+ </dependency>
+ <dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.7.3.3</version>
Modified: maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java?rev=224494&r1=224493&r2=224494&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java (original)
+++ maven/continuum/trunk/continuum-xmlrpc/src/test/java/org/apache/maven/continuum/xmlrpc/ContinuumXmlRpcTest.java Sat Jul 23 11:21:48 2005
@@ -16,28 +16,22 @@
* limitations under the License.
*/
-import java.util.ArrayList;
+import org.apache.maven.continuum.AbstractContinuumTest;
+import org.apache.maven.continuum.project.MavenTwoProject;
+import org.apache.maven.continuum.store.ContinuumStore;
+
import java.util.Hashtable;
import java.util.Iterator;
-import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.TreeMap;
import java.util.Vector;
-import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
-import org.apache.maven.continuum.project.ContinuumNotifier;
-import org.apache.maven.continuum.project.MavenTwoProject;
-import org.apache.maven.continuum.store.ContinuumStore;
-
-import org.codehaus.plexus.PlexusTestCase;
-
/**
* @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
* @version $Id$
*/
public class ContinuumXmlRpcTest
- extends PlexusTestCase
+ extends AbstractContinuumTest
{
public void testBasic()
throws Exception
@@ -60,61 +54,7 @@
Hashtable hashtable = xmlRpc.getProject( project.getId() );
-// dumpValue( 0, "result", hashtable );
- }
-
- public static MavenTwoProject makeStubMavenTwoProject( String name, String scmUrl )
- {
- return makeMavenTwoProject( name,
- scmUrl,
- "foo@bar.com",
- "1.0",
- "",
- ContinuumBuildExecutor.MAVEN_TWO_EXECUTOR_ID,
- "/tmp" );
- }
-
- public static MavenTwoProject makeMavenTwoProject( String name,
- String scmUrl,
- String emailAddress,
- String version,
- String commandLineArguments,
- String executorId,
- String workingDirectory )
- {
- MavenTwoProject project = new MavenTwoProject();
-
- project.setName( name );
- project.setScmUrl( scmUrl );
-
- List notifiers = createNotifiers( emailAddress );
- project.setNotifiers( notifiers );
-
- project.setVersion( version );
- project.setCommandLineArguments( commandLineArguments );
- project.setExecutorId( executorId );
- project.setWorkingDirectory( workingDirectory );
-
- return project;
- }
-
- private static List createNotifiers( String emailAddress )
- {
- ContinuumNotifier notifier = new ContinuumNotifier();
-
- notifier.setType( "mail" );
-
- Properties props = new Properties();
-
- props.put( "address", emailAddress );
-
- notifier.setConfiguration( props );
-
- List notifiers = new ArrayList();
-
- notifiers.add( notifier );
-
- return notifiers;
+ dumpValue( 0, "result", hashtable );
}
// ----------------------------------------------------------------------
@@ -133,7 +73,7 @@
}
else
{
- System.err.println( makeIndent( indent ) + key + "=" + value );
+ out( makeIndent( indent ) + key + "=" + value );
}
}
@@ -141,7 +81,7 @@
{
Map map = new TreeMap( hashtable );
- System.err.println( makeIndent( indent ) + key + " = {" );
+ out( makeIndent( indent ) + key + " = {" );
for ( Iterator it = map.entrySet().iterator(); it.hasNext(); )
{
@@ -152,12 +92,12 @@
dumpValue( indent + 1, (String) entry.getKey(), value );
}
- System.err.println( makeIndent( indent ) + "}" );
+ out( makeIndent( indent ) + "}" );
}
private void dumpVector( int indent, String key, Vector vector )
{
- System.err.println( makeIndent( indent ) + key + " = [" );
+ out( makeIndent( indent ) + key + " = [" );
Iterator it;
@@ -170,7 +110,7 @@
dumpValue( indent + 1, "#" + i, value );
}
- System.err.println( makeIndent( indent ) + "]" );
+ out( makeIndent( indent ) + "]" );
}
private String makeIndent( int size )
@@ -183,5 +123,10 @@
}
return s;
+ }
+
+ private void out( String message )
+ {
+// System.out.println( message );
}
}