maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From denn...@apache.org
Subject svn commit: r1054698 - in /maven/plugins/trunk/maven-changes-plugin/src: main/java/org/apache/maven/plugin/issues/ main/java/org/apache/maven/plugin/jira/ main/java/org/apache/maven/plugin/trac/ test/java/org/apache/maven/plugin/issues/ test/java/org/a...
Date Mon, 03 Jan 2011 18:19:59 GMT
Author: dennisl
Date: Mon Jan  3 18:19:58 2011
New Revision: 1054698

URL: http://svn.apache.org/viewvc?rev=1054698&view=rev
Log:
Refactoring: Merge JiraIssue and TracTicket into a new generic Issue class.

Added:
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java
      - copied, changed from r1054472, maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraIssue.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java
  (with props)
    maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/issues/
    maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/issues/IssueTestCase.java
  (contents, props changed)
      - copied, changed from r1054472, maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraIssueTest.java
Removed:
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraIssue.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracTicket.java
    maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/
Modified:
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraAdapter.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraHelper.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracDownloader.java
    maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java

Copied: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java
(from r1054472, maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraIssue.java)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java?p2=maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java&p1=maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraIssue.java&r1=1054472&r2=1054698&rev=1054698&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraIssue.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/Issue.java
Mon Jan  3 18:19:58 2011
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.jira;
+package org.apache.maven.plugin.issues;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,19 +20,25 @@ package org.apache.maven.plugin.jira;
  */
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 /**
- * A JIRA issue.
+ * An issue.
  *
+ * @author Dennis Lundberg
  * @version $Id$
  */
-public class JiraIssue
+public class Issue
 {
     private List components;
 
+    private Date created;
+
     private List fixVersions;
 
+    private String id;
+
     private String key;
 
     private String link;
@@ -47,6 +53,8 @@ public class JiraIssue
 
     private String type;
 
+    private Date updated;
+
     private String version;
 
     private String resolution;
@@ -57,7 +65,7 @@ public class JiraIssue
 
     private String title;
 
-    public JiraIssue()
+    public Issue()
     {
     }
 
@@ -135,6 +143,16 @@ public class JiraIssue
         components.add( component );
     }
 
+    public Date getCreated()
+    {
+        return created;
+    }
+
+    public void setCreated( Date created )
+    {
+        this.created = created;
+    }
+
     public List getFixVersions()
     {
         return fixVersions;
@@ -149,6 +167,16 @@ public class JiraIssue
         fixVersions.add( fixVersion );
     }
 
+    public String getId()
+    {
+        return id;
+    }
+
+    public void setId( String id )
+    {
+        this.id = id;
+    }
+
     public String getPriority()
     {
         return priority;
@@ -179,6 +207,16 @@ public class JiraIssue
         this.type = type;
     }
 
+    public Date getUpdated()
+    {
+        return updated;
+    }
+
+    public void setUpdated( Date updated )
+    {
+        this.updated = updated;
+    }
+
     public String getVersion()
     {
         return version;

Added: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java?rev=1054698&view=auto
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java
(added)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java
Mon Jan  3 18:19:58 2011
@@ -0,0 +1,57 @@
+package org.apache.maven.plugin.issues;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * A helper class for generation of reports based on issues.
+ *
+ * @author Dennis Lundberg
+ * @version $Id: Issue.java 1050925 2010-12-19 18:09:36Z dennisl $
+ */
+public class IssuesReportGenerator
+{
+    /**
+     * Print a list of values separated by commas.
+     *
+     * @param values The values to print
+     * @return A nicely formatted string of values.
+     */
+    public static String printValues( List values )
+    {
+        StringBuffer sb = new StringBuffer();
+        if( values != null )
+        {
+            Iterator iterator = values.iterator();
+            while ( iterator.hasNext() )
+            {
+                String value = (String) iterator.next();
+                sb.append( value );
+                if ( iterator.hasNext() )
+                {
+                    sb.append( ", " );
+                }
+            }
+        }
+        return sb.toString();
+    }
+}

Propchange: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraAdapter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraAdapter.java?rev=1054698&r1=1054697&r2=1054698&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraAdapter.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraAdapter.java
Mon Jan  3 18:19:58 2011
@@ -19,6 +19,7 @@ package org.apache.maven.plugin.jira;
  * under the License.
  */
 
+import org.apache.maven.plugin.issues.Issue;
 import org.apache.maven.plugins.changes.model.Action;
 import org.apache.maven.plugins.changes.model.Release;
 
@@ -39,7 +40,7 @@ import java.util.Map;
 public class JiraAdapter
 {
     /**
-     * Adapt a <code>List</code> of <code>JiraIssue</code>s to a
+     * Adapt a <code>List</code> of <code>Issue</code>s to a
      * <code>List</code> of <code>Release</code>s.
      *
      * @param issues The JIRA issues
@@ -53,7 +54,7 @@ public class JiraAdapter
         // Loop through all issues looking for fixVersions
         for ( int i = 0; i < issues.size(); i++ )
         {
-            JiraIssue issue = (JiraIssue) issues.get( i );
+            Issue issue = (Issue) issues.get( i );
             // Do NOT create a release for issues that lack a fixVersion
             if ( issue.getFixVersions() != null )
             {
@@ -89,12 +90,12 @@ public class JiraAdapter
     }
 
     /**
-     * Create an <code>Action</code> from a JIRA issue.
+     * Create an <code>Action</code> from an issue.
      *
      * @param issue The issue to extract the information from
      * @return An <code>Action</code>
      */
-    public static Action createAction( JiraIssue issue )
+    public static Action createAction( Issue issue )
     {
         Action action = new Action();
 

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraHelper.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraHelper.java?rev=1054698&r1=1054697&r2=1054698&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraHelper.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraHelper.java
Mon Jan  3 18:19:58 2011
@@ -28,6 +28,7 @@ import java.util.StringTokenizer;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.issues.Issue;
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.wagon.proxy.ProxyInfo;
 
@@ -60,7 +61,7 @@ public class JiraHelper
     {
         List issuesForVersion = new ArrayList();
         boolean isFound = false;
-        JiraIssue issue = null;
+        Issue issue = null;
         String releaseVersion = version;
 
         // Remove "-SNAPSHOT" from the end of the version, if it's there
@@ -71,7 +72,7 @@ public class JiraHelper
 
         for ( int i = 0; i < issues.size(); i++ )
         {
-            issue = (JiraIssue) issues.get( i );
+            issue = (Issue) issues.get( i );
 
             if ( issue.getFixVersions() != null && issue.getFixVersions().contains(
releaseVersion ) )
             {

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java?rev=1054698&r1=1054697&r2=1054698&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraReportGenerator.java
Mon Jan  3 18:19:58 2011
@@ -20,9 +20,10 @@ package org.apache.maven.plugin.jira;
  */
 
 import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.plugin.issues.Issue;
+import org.apache.maven.plugin.issues.IssuesReportGenerator;
 import org.apache.maven.reporting.MavenReportException;
 
-import java.util.Iterator;
 import java.util.List;
 import java.util.ResourceBundle;
 
@@ -200,7 +201,7 @@ public class JiraReportGenerator
 
         for ( int idx = 0; idx < issueList.size(); idx++ )
         {
-            JiraIssue issue = (JiraIssue) issueList.get( idx );
+            Issue issue = (Issue) issueList.get( idx );
 
             sink.tableRow();
 
@@ -249,11 +250,11 @@ public class JiraReportGenerator
                         break;
 
                     case COLUMN_FIX_VERSION:
-                        sinkCell( sink, printValues( issue.getFixVersions() ) );
+                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getFixVersions()
) );
                         break;
 
                     case COLUMN_COMPONENT:
-                        sinkCell( sink, printValues( issue.getComponents() ) );
+                        sinkCell( sink, IssuesReportGenerator.printValues( issue.getComponents()
) );
                         break;
 
                     default:
@@ -338,29 +339,4 @@ public class JiraReportGenerator
 
         sink.sectionTitle1_();
     }
-
-    /**
-     * Print a list of values separated by commas.
-     *
-     * @param values The values to print
-     * @return A nicely formatted string of values.
-     */
-    private static String printValues( List values )
-    {
-        StringBuffer sb = new StringBuffer();
-        if( values != null )
-        {
-            Iterator iterator = values.iterator();
-            while ( iterator.hasNext() )
-            {
-                String value = (String) iterator.next();
-                sb.append( value );
-                if ( iterator.hasNext() )
-                {
-                    sb.append( ", " );
-                }
-            }
-        }
-        return sb.toString();
-    }
 }

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java?rev=1054698&r1=1054697&r2=1054698&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/jira/JiraXML.java
Mon Jan  3 18:19:58 2011
@@ -28,15 +28,16 @@ import java.util.List;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
+import org.apache.maven.plugin.issues.Issue;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
 /**
- * XML parser for <code>JiraIssue</code>s. This works on an XML file downloaded
- * from JIRA and creates a List of issues that is exposed to the user of the
- * class.
+ * XML parser that extracts <code>Issue</code>s from JIRA. This works on an XML
+ * file downloaded from JIRA and creates a <code>List</code> of issues that is
+ * exposed to the user of the class.
  *
  * @version $Id$
  */
@@ -49,7 +50,7 @@ public class JiraXML
 
     private String currentParent = "";
 
-    private JiraIssue issue;
+    private Issue issue;
 
     public JiraXML( File xmlPath, String encoding )
     {
@@ -93,7 +94,7 @@ public class JiraXML
     {
         if ( qName.equals( "item" ) )
         {
-            issue = new JiraIssue();
+            issue = new Issue();
 
             currentParent = "item";
         }

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracDownloader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracDownloader.java?rev=1054698&r1=1054697&r2=1054698&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracDownloader.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracDownloader.java
Mon Jan  3 18:19:58 2011
@@ -19,6 +19,7 @@ package org.apache.maven.plugin.trac;
  * under the License.
  */
 
+import org.apache.maven.plugin.issues.Issue;
 import org.apache.maven.project.MavenProject;
 import org.apache.xmlrpc.XmlRpcException;
 import org.apache.xmlrpc.client.XmlRpcClient;
@@ -27,8 +28,13 @@ import org.codehaus.plexus.util.StringUt
 
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 /**
@@ -49,17 +55,17 @@ public class TracDownloader
     /** The username for authentication into a private Trac installation. */
     private String tracUser;
 
-    private TracTicket createTicket( Object[] ticketObj )
+    private Issue createTicket( Object[] ticketObj )
     {
-        TracTicket ticket = new TracTicket();
+        Issue ticket = new Issue();
 
         ticket.setId( String.valueOf( ticketObj[0] ) );
 
         ticket.setLink( getUrl() + "/ticket/" + String.valueOf( ticketObj[0] ) );
 
-        ticket.setTimeCreated( String.valueOf( ticketObj[1] ) );
+        ticket.setCreated( parseDate( String.valueOf( ticketObj[1] ) ) );
 
-        ticket.setTimeChanged( String.valueOf( ticketObj[2] ) );
+        ticket.setUpdated( parseDate( String.valueOf( ticketObj[2] ) ) );
 
         Map attributes = (Map) ticketObj[3];
 
@@ -71,15 +77,15 @@ public class TracDownloader
 
         ticket.setResolution( (String) attributes.get( "resolution" ) );
 
-        ticket.setOwner( (String) attributes.get( "owner" ) );
+        ticket.setAssignee( (String) attributes.get( "owner" ) );
 
-        ticket.setMilestone( (String) attributes.get( "milestone" ) );
+        ticket.addFixVersion( (String) attributes.get( "milestone" ) );
 
         ticket.setPriority( (String) attributes.get( "priority" ) );
 
         ticket.setReporter( (String) attributes.get( "reporter" ) );
 
-        ticket.setComponent( (String) attributes.get( "component" ) );
+        ticket.addComponent( (String) attributes.get( "component" ) );
 
         return ticket;
     }
@@ -166,4 +172,28 @@ public class TracDownloader
     {
         this.tracUser = tracUser;
     }
+
+    private Date parseDate( String timeCreated )
+        throws RuntimeException
+    {
+        try
+        {
+            long millis = Long.parseLong( timeCreated );
+            Calendar cld = Calendar.getInstance();
+            cld.setTimeInMillis( millis * 1000L );
+            return cld.getTime();
+        }
+        catch ( NumberFormatException e )
+        {
+            SimpleDateFormat format = new SimpleDateFormat( "EEE MMM dd HH:mm:ss z yyyy",
Locale.ENGLISH );
+            try
+            {
+                return format.parse( timeCreated );
+            }
+            catch ( ParseException e1 )
+            {
+                throw new RuntimeException( "Failed to parse date '" + timeCreated + "' as
a date.", e1 );
+            }
+        }
+    }
 }

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java?rev=1054698&r1=1054697&r2=1054698&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/trac/TracReportGenerator.java
Mon Jan  3 18:19:58 2011
@@ -24,6 +24,8 @@ import java.util.List;
 import java.util.ResourceBundle;
 
 import org.apache.maven.doxia.sink.Sink;
+import org.apache.maven.plugin.issues.Issue;
+import org.apache.maven.plugin.issues.IssuesReportGenerator;
 import org.apache.maven.reporting.MavenReportException;
 
 /**
@@ -192,7 +194,7 @@ public class TracReportGenerator
         {
             SimpleDateFormat sdf = new SimpleDateFormat( bundle.getString( "report.trac.dateformat"
) );
 
-            TracTicket ticket = (TracTicket) ticketList.get( idx );
+            Issue ticket = (Issue) ticketList.get( idx );
 
             sink.tableRow();
 
@@ -214,7 +216,7 @@ public class TracReportGenerator
                         sinkCell( sink, ticket.getSummary() );
                         break;
                     case COLUMN_OWNER:
-                        sinkCell( sink, ticket.getOwner() );
+                        sinkCell( sink, ticket.getAssignee() );
                         break;
                     case COLUMN_REPORTER:
                         sinkCell( sink, ticket.getReporter() );
@@ -229,16 +231,16 @@ public class TracReportGenerator
                         sinkCell( sink, ticket.getResolution() );
                         break;
                     case COLUMN_CREATED:
-                        sinkCell( sink, sdf.format( ticket.getTimeCreated() ) );
+                        sinkCell( sink, sdf.format( ticket.getCreated() ) );
                         break;
                     case COLUMN_CHANGED:
-                        sinkCell( sink, sdf.format( ticket.getTimeChanged() ) );
+                        sinkCell( sink, sdf.format( ticket.getUpdated() ) );
                         break;
                     case COLUMN_MILESTONE:
-                        sinkCell( sink, ticket.getMilestone() );
+                        sinkCell( sink, IssuesReportGenerator.printValues( ticket.getFixVersions()
) );
                         break;
                     case COLUMN_COMPONENT:
-                        sinkCell( sink, ticket.getComponent() );
+                        sinkCell( sink, IssuesReportGenerator.printValues( ticket.getComponents()
) );
                         break;
                     default:
                         // Do not add details for this column

Copied: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/issues/IssueTestCase.java
(from r1054472, maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraIssueTest.java)
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/issues/IssueTestCase.java?p2=maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/issues/IssueTestCase.java&p1=maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraIssueTest.java&r1=1054472&r2=1054698&rev=1054698&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/jira/JiraIssueTest.java
(original)
+++ maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/issues/IssueTestCase.java
Mon Jan  3 18:19:58 2011
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.jira;
+package org.apache.maven.plugin.issues;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,24 +19,23 @@ package org.apache.maven.plugin.jira;
  * under the License.
  */
 
-import junit.framework.Test;
 import junit.framework.TestCase;
-import junit.framework.TestSuite;
 
-public class JiraIssueTest
+/**
+ * Tests for the Issue class.
+ *
+ * @author Dennis Lundberg
+ * @version $Id$
+ */
+public class IssueTestCase
     extends TestCase
 {
-    JiraIssue issue;
-
-    public JiraIssueTest( String testName )
-    {
-        super( testName );
-    }
+    Issue issue;
 
     protected void setUp()
         throws Exception
     {
-        issue = new JiraIssue();
+        issue = new Issue();
     }
 
     protected void tearDown()
@@ -44,13 +43,6 @@ public class JiraIssueTest
     {
     }
 
-    public static Test suite()
-    {
-        TestSuite suite = new TestSuite( JiraIssueTest.class );
-
-        return suite;
-    }
-
     public void testGetSetKey()
     {
         issue.setKey( "key" );

Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/issues/IssueTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-changes-plugin/src/test/java/org/apache/maven/plugin/issues/IssueTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message