Index: src/test/java/org/apache/maven/plugin/changes/ReleaseTest.java
===================================================================
--- src/test/java/org/apache/maven/plugin/changes/ReleaseTest.java (r‚vision 425639)
+++ src/test/java/org/apache/maven/plugin/changes/ReleaseTest.java (copie de travail)
@@ -1,76 +0,0 @@
-package org.apache.maven.plugin.changes;
-
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed 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.ArrayList;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class ReleaseTest
- extends TestCase
-{
- Release release = new Release();
-
- public ReleaseTest( String testName )
- {
- super( testName );
- }
-
- protected void setUp()
- throws Exception
- {
- }
-
- protected void tearDown()
- throws Exception
- {
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite( ReleaseTest.class );
-
- return suite;
- }
-
- public void testGetSetVersion()
- {
- release.setVersion( "version" );
-
- assertEquals( "version", release.getVersion() );
- }
-
- public void testGetSetDateRelease()
- {
- release.setDateRelease( "12-09-1979" );
-
- assertEquals( "12-09-1979", release.getDateRelease() );
- }
-
- public void testGetSetAction()
- {
- List actionList = new ArrayList();
-
- release.setAction( actionList );
-
- assertEquals( actionList, release.getAction() );
- }
-
-}
Index: src/test/java/org/apache/maven/plugin/changes/model/ReleaseTest.java
===================================================================
--- src/test/java/org/apache/maven/plugin/changes/model/ReleaseTest.java (r‚vision 0)
+++ src/test/java/org/apache/maven/plugin/changes/model/ReleaseTest.java (copie de travail)
@@ -1,4 +1,4 @@
-package org.apache.maven.plugin.changes;
+package org.apache.maven.plugin.changes.model;
/*
* Copyright 2005-2006 The Apache Software Foundation.
@@ -16,13 +16,12 @@
* limitations under the License.
*/
-import java.util.ArrayList;
-import java.util.List;
-
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.apache.maven.plugins.changes.model.Release;
+
public class ReleaseTest
extends TestCase
{
@@ -59,18 +58,9 @@
public void testGetSetDateRelease()
{
- release.setDateRelease( "12-09-1979" );
+ release.setDate( "12-09-1979" );
- assertEquals( "12-09-1979", release.getDateRelease() );
+ assertEquals( "12-09-1979", release.getDate() );
}
- public void testGetSetAction()
- {
- List actionList = new ArrayList();
-
- release.setAction( actionList );
-
- assertEquals( actionList, release.getAction() );
- }
-
}
Index: src/test/java/org/apache/maven/plugin/changes/model/ActionTest.java
===================================================================
--- src/test/java/org/apache/maven/plugin/changes/model/ActionTest.java (r‚vision 0)
+++ src/test/java/org/apache/maven/plugin/changes/model/ActionTest.java (r‚vision 0)
@@ -0,0 +1,72 @@
+package org.apache.maven.plugin.changes.model;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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 org.apache.maven.plugins.changes.model.Action;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class ActionTest
+ extends TestCase
+{
+ Action action = new Action();
+
+ public ActionTest( String testName )
+ {
+ super( testName );
+ }
+
+ protected void setUp()
+ throws Exception
+ {
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite( ActionTest.class );
+
+ return suite;
+ }
+
+ public void testGetSetDescription()
+ {
+ action.setDescription( "action" );
+
+ assertEquals( "action", action.getDescription() );
+ }
+
+ public void testGetSetDev()
+ {
+ action.setDev( "developer" );
+
+ assertEquals( "developer", action.getDev() );
+ }
+
+ public void testGetSetType()
+ {
+ action.setType( "type" );
+
+ assertEquals( "type", action.getType() );
+ }
+}
Index: src/test/java/org/apache/maven/plugin/changes/ChangesDocumentParserOldTest.java
===================================================================
--- src/test/java/org/apache/maven/plugin/changes/ChangesDocumentParserOldTest.java (r‚vision 0)
+++ src/test/java/org/apache/maven/plugin/changes/ChangesDocumentParserOldTest.java (r‚vision 0)
@@ -0,0 +1,134 @@
+package org.apache.maven.plugin.changes;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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 junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+import org.apache.maven.plugins.changes.model.Action;
+import org.apache.maven.plugins.changes.model.Body;
+import org.apache.maven.plugins.changes.model.ChangesDocument;
+import org.apache.maven.plugins.changes.model.Dueto;
+import org.apache.maven.plugins.changes.model.Fixes;
+import org.apache.maven.plugins.changes.model.Release;
+
+/**
+ * Test backward compatibility of changes-plugin with previous Xml file format.
+ *
+ * @author Denis Cabasson
+ */
+public class ChangesDocumentParserOldTest
+ extends TestCase
+{
+
+ private String basedir;
+
+ public ChangesDocumentParserOldTest( String testName )
+ {
+ super( testName );
+ }
+
+ protected void setUp()
+ throws Exception
+ {
+ basedir = System.getProperty( "basedir", System.getProperty( "user.dir" ) );
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite( ChangesDocumentParserOldTest.class );
+ return suite;
+ }
+
+ public void testDocumentParsing()
+ {
+ try
+ {
+ ChangesDocumentParser parser = new ChangesDocumentParser( basedir + "/src/test/resources/changes-old.xml",
+ new SystemStreamLog() );
+ checkOldChange( parser.getReport() );
+ }
+ catch ( MojoExecutionException e )
+ {
+ fail( "The old format document should be parsed." );
+ }
+ }
+
+ protected static void checkOldChange( ChangesDocument doc )
+ {
+ assertEquals( "Checking document's title", "Changes Tester Project", doc.getProperties().getTitle().trim() );
+ Body body = doc.getBody();
+ assertEquals( "Checking number of releases", 2, body.getReleases().size() );
+ Release release = (Release) body.getReleases().get( 0 );
+ assertEquals( "Checking version of latest release", "1.1", release.getVersion() );
+ assertEquals( "Checking date of latest release", "2005-03-01", release.getDate() );
+ assertEquals( "Checking description of latest release", "Subsequent release", release.getDescription() );
+ assertEquals( "Checking number of actions in latest release", 3, release.getActions().size() );
+ Action action = (Action) release.getActions().get( 0 );
+ assertEquals( "Checking type of first action of latest release", "add", action.getType() );
+ assertEquals( "Checking developper of first action of latest release", "jruiz", action.getDev() );
+ assertEquals( "Checking description of first action of latest release",
+ "Added additional documentation on how to configure the plugin.", action.getDescription() );
+ assertEquals( "Checking number of duetos of first action of latest release", 1, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of first action of latest release", 0, action.getFixess().size() );
+ Dueto dueto = (Dueto) action.getDuetos().get( 0 );
+ assertEquals( "Checking dueto (name) of first action of latest release", "Dennis Lundberg", dueto.getName() );
+ assertNull( "Checking dueto (email) of first action of latest release", dueto.getEmail() );
+ action = (Action) release.getActions().get( 1 );
+ assertEquals( "Checking type of second action of latest release", "fix", action.getType() );
+ assertEquals( "Checking developper of second action of latest release", "aramirez", action.getDev() );
+ assertEquals( "Checking description of second action of latest release",
+ "Enable retrieving component-specific issues.", action.getDescription() );
+ assertEquals( "Checking number of duetos of second action of latest release", 0, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of second action of latest release", 1, action.getFixess().size() );
+ Fixes fixes = (Fixes) action.getFixess().get( 0 );
+ assertEquals( "Checking issue of fixes of second action of latest release", "MPJIRA-11", fixes.getIssue() );
+ action = (Action) release.getActions().get( 2 );
+ assertEquals( "Checking type of third action of latest release", "remove", action.getType() );
+ assertEquals( "Checking developper of third action of latest release", "jruiz", action.getDev() );
+ assertEquals(
+ "Checking description of third action of latest release",
+ "The element type \" link \" must be terminated by the matching end-tag.\nDeleted the erroneous code.",
+ action.getDescription().trim() );
+ assertEquals( "Checking number of duetos of third action of latest release", 1, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of third action of latest release", 0, action.getFixess().size() );
+ dueto = (Dueto) action.getDuetos().get( 0 );
+ assertEquals( "Checking dueto (name) of third action of latest release", "Allan Ramirez", dueto.getName() );
+ assertEquals( "Checking dueto (email) of third action of latest release", "aramirez@exist.com", dueto
+ .getEmail() );
+ release = (Release) body.getReleases().get( 1 );
+ assertEquals( "Checking version of former release", "1.0", release.getVersion() );
+ assertEquals( "Checking date of former release", "2005-01-01", release.getDate() );
+ assertEquals( "Checking description of former release", "First release", release.getDescription() );
+ assertEquals( "Checking number of actions in former release", 1, release.getActions().size() );
+ action = (Action) release.getActions().get( 0 );
+ assertEquals( "Checking type of action of former release", "update", action.getType() );
+ assertEquals( "Checking developper of action of former release", "jruiz", action.getDev() );
+ assertEquals( "Checking description of action of former release",
+ "Uploaded documentation on how to use the plugin.", action.getDescription() );
+ assertEquals( "Checking number of duetos of action of former release", 0, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of action of former release", 0, action.getFixess().size() );
+ }
+}
Index: src/test/java/org/apache/maven/plugin/changes/ChangesXMLTest.java
===================================================================
--- src/test/java/org/apache/maven/plugin/changes/ChangesXMLTest.java (r‚vision 0)
+++ src/test/java/org/apache/maven/plugin/changes/ChangesXMLTest.java (r‚vision 0)
@@ -0,0 +1,82 @@
+package org.apache.maven.plugin.changes;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.xml.sax.SAXException;
+
+/**
+ * Test parsing of 'old' Xml file format.
+ *
+ * @author Denis Cabasson
+ */
+public class ChangesXMLTest
+ extends TestCase
+{
+ private String basedir;
+
+ public ChangesXMLTest( String testName )
+ {
+ super( testName );
+ }
+
+ protected void setUp()
+ throws Exception
+ {
+ basedir = System.getProperty( "basedir", System.getProperty( "user.dir" ) );
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite( ChangesXMLTest.class );
+ return suite;
+ }
+
+ public void testDocumentParsing()
+ {
+ try
+ {
+ ChangesXML parser = new ChangesXML( basedir + "/src/test/resources/changes-old.xml" );
+ ChangesDocumentParserOldTest.checkOldChange( parser.getChangesDocument() );
+ }
+ catch ( SAXException e )
+ {
+ fail( "The old format document should be parsed." );
+ }
+ catch ( ParserConfigurationException e )
+ {
+ fail( "The old format document should be parsed." );
+ }
+ catch ( IOException e )
+ {
+ fail( "The old format document should be present." );
+ }
+ }
+
+}
Index: src/test/java/org/apache/maven/plugin/changes/ActionTest.java
===================================================================
--- src/test/java/org/apache/maven/plugin/changes/ActionTest.java (r‚vision 425639)
+++ src/test/java/org/apache/maven/plugin/changes/ActionTest.java (copie de travail)
@@ -1,91 +0,0 @@
-package org.apache.maven.plugin.changes;
-
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed 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 junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class ActionTest
- extends TestCase
-{
- Action action = new Action();
-
- public ActionTest( String testName )
- {
- super( testName );
- }
-
- protected void setUp()
- throws Exception
- {
- }
-
- protected void tearDown()
- throws Exception
- {
- }
-
- public static Test suite()
- {
- TestSuite suite = new TestSuite( ActionTest.class );
-
- return suite;
- }
-
- public void testGetSetAction()
- {
- action.setAction( "action" );
-
- assertEquals( "action", action.getAction() );
- }
-
- public void testGetSetDev()
- {
- action.setDev( "developer" );
-
- assertEquals( "developer", action.getDev() );
- }
-
- public void testGetSetType()
- {
- action.setType( "type" );
-
- assertEquals( "type", action.getType() );
- }
-
- public void testGetSetIssue()
- {
- action.setIssue( "issue" );
-
- assertEquals( "issue", action.getIssue() );
- }
-
- public void testGetSetDueTo()
- {
- action.setDueTo( "due-to" );
-
- assertEquals( "due-to", action.getDueTo() );
- }
-
- public void testGetSetDueToEmail()
- {
- action.setDueToEmail( "due-to-mail" );
-
- assertEquals( "due-to-mail", action.getDueToEmail() );
- }
-}
Index: src/test/java/org/apache/maven/plugin/changes/ChangesDocumentParserNewTest.java
===================================================================
--- src/test/java/org/apache/maven/plugin/changes/ChangesDocumentParserNewTest.java (r‚vision 0)
+++ src/test/java/org/apache/maven/plugin/changes/ChangesDocumentParserNewTest.java (r‚vision 0)
@@ -0,0 +1,200 @@
+package org.apache.maven.plugin.changes;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.io.FileReader;
+import java.io.IOException;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.logging.SystemStreamLog;
+import org.apache.maven.plugins.changes.model.Action;
+import org.apache.maven.plugins.changes.model.Body;
+import org.apache.maven.plugins.changes.model.ChangesDocument;
+import org.apache.maven.plugins.changes.model.Dueto;
+import org.apache.maven.plugins.changes.model.Fixes;
+import org.apache.maven.plugins.changes.model.Release;
+import org.apache.maven.plugins.changes.model.io.xpp3.ChangesXpp3Reader;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+/**
+ * Test parsing of 'new' Xml file format.
+ *
+ * @author Denis Cabasson
+ */
+public class ChangesDocumentParserNewTest
+ extends TestCase
+{
+
+ private String basedir;
+
+ public ChangesDocumentParserNewTest( String testName )
+ {
+ super( testName );
+ }
+
+ protected void setUp()
+ throws Exception
+ {
+ basedir = System.getProperty( "basedir", System.getProperty( "user.dir" ) );
+ }
+
+ protected void tearDown()
+ throws Exception
+ {
+ }
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite( ChangesDocumentParserNewTest.class );
+ return suite;
+ }
+
+ public void testDocumentParsing()
+ {
+ try
+ {
+ ChangesDocumentParser parser = new ChangesDocumentParser( basedir + "/src/test/resources/changes-new.xml",
+ new SystemStreamLog() );
+ checkNewChange( parser.getReport() );
+ }
+ catch ( MojoExecutionException e )
+ {
+ fail( "The new format document should be parsed." );
+ }
+ }
+
+ public void testDocumentParsinXppReader()
+ {
+ try
+ {
+ ChangesXpp3Reader reader = new ChangesXpp3Reader();
+ ChangesDocument doc = reader.read( new FileReader( basedir + "/src/test/resources/changes-new.xml" ) );
+ checkNewChange( doc );
+ }
+ catch ( IOException e )
+ {
+ fail( "The new format document should be present." );
+ }
+ catch ( XmlPullParserException e )
+ {
+ fail( "The new format document should be parsed." );
+ }
+ }
+
+ public void testOldDocumentParsing()
+ {
+ ChangesXpp3Reader reader = new ChangesXpp3Reader();
+ try
+ {
+ reader.read( new FileReader( basedir + "/src/test/resources/changes-old.xml" ) );
+ fail( "Parsing of 'old' format with 'new' parser should fail" );
+ }
+ catch ( IOException e )
+ {
+ fail( "The old format document should be present." );
+ }
+ catch ( XmlPullParserException e )
+ {
+ // Expected behaviour
+ }
+ }
+
+ protected static void checkNewChange( ChangesDocument doc )
+ {
+ assertEquals( "Checking document's title", "Changes Tester Project", doc.getProperties().getTitle() );
+ Body body = doc.getBody();
+ assertEquals( "Checking number of releases", 2, body.getReleases().size() );
+ Release release = (Release) body.getReleases().get( 0 );
+ assertEquals( "Checking version of latest release", "1.1", release.getVersion() );
+ assertEquals( "Checking date of latest release", "2005-03-01", release.getDate() );
+ assertEquals( "Checking description of latest release", "Subsequent release", release.getDescription() );
+ assertEquals( "Checking number of actions in latest release", 4, release.getActions().size() );
+ Action action = (Action) release.getActions().get( 0 );
+ assertEquals( "Checking type of first action of latest release", "add", action.getType() );
+ assertEquals( "Checking developper of first action of latest release", "jruiz", action.getDev() );
+ assertEquals( "Checking description of first action of latest release",
+ "Added additional documentation on how to configure the plugin.", action.getDescription() );
+ assertEquals( "Checking number of duetos of first action of latest release", 2, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of first action of latest release", 0, action.getFixess().size() );
+ Dueto dueto = (Dueto) action.getDuetos().get( 0 );
+ assertEquals( "Checking first dueto (name) of first action of latest release", "Dennis Lundberg", dueto
+ .getName() );
+ assertNull( "Checking first dueto (email) of first action of latest release", dueto.getEmail() );
+ dueto = (Dueto) action.getDuetos().get( 1 );
+ assertEquals( "Checking second dueto (name) of first action of latest release", "Allan Ramirez", dueto
+ .getName() );
+ assertEquals( "Checking second dueto (email) of first action of latest release", "aramirez@exist.com", dueto
+ .getEmail() );
+ action = (Action) release.getActions().get( 1 );
+ assertEquals( "Checking type of second action of latest release", "fix", action.getType() );
+ assertEquals( "Checking developper of second action of latest release", "aramirez", action.getDev() );
+ assertEquals( "Checking description of second action of latest release",
+ "Enable retrieving component-specific issues.", action.getDescription() );
+ assertEquals( "Checking number of duetos of second action of latest release", 0, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of second action of latest release", 2, action.getFixess().size() );
+ Fixes fixes = (Fixes) action.getFixess().get( 0 );
+ assertEquals( "Checking issue of first fixes of second action of latest release", "MPJIRA-11", fixes.getIssue() );
+ fixes = (Fixes) action.getFixess().get( 1 );
+ assertEquals( "Checking issue of second fixes of second action of latest release", "MPJIRA-18", fixes
+ .getIssue() );
+ action = (Action) release.getActions().get( 2 );
+ assertEquals( "Checking type of third action of latest release", "remove", action.getType() );
+ assertEquals( "Checking developper of third action of latest release", "jruiz", action.getDev() );
+ // TODO Shouldn't all those spaces be stripped?
+ assertEquals(
+ "Checking description of third action of latest release",
+ "The element type \" link \" must be terminated by the matching\n end-tag. Deleted the erroneous code.",
+ action.getDescription() );
+ assertEquals( "Checking number of duetos of third action of latest release", 1, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of third action of latest release", 0, action.getFixess().size() );
+ dueto = (Dueto) action.getDuetos().get( 0 );
+ assertEquals( "Checking dueto (name) of third action of latest release", "Allan Ramirez", dueto.getName() );
+ assertEquals( "Checking dueto (email) of third action of latest release", "aramirez@exist.com", dueto
+ .getEmail() );
+ action = (Action) release.getActions().get( 3 );
+ assertEquals( "Checking type of fourth action of latest release", "fix", action.getType() );
+ assertEquals( "Checking developper of fourth action of latest release", "jruiz", action.getDev() );
+ assertEquals( "Checking description of fourth action of latest release", "Don't fix it if it ain't broken!",
+ action.getDescription() );
+ assertEquals( "Checking number of duetos of fourth action of latest release", 1, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of fourth action of latest release", 1, action.getFixess().size() );
+ dueto = (Dueto) action.getDuetos().get( 0 );
+ assertEquals( "Checking dueto (name) of fourth action of latest release", "Allan Ramirez", dueto.getName() );
+ assertEquals( "Checking dueto (email) of fourth action of latest release", "aramirez@exist.com", dueto
+ .getEmail() );
+ fixes = (Fixes) action.getFixess().get( 0 );
+ assertEquals( "Checking issue of fixes of fourth action of latest release", "MPJIRA-24", fixes.getIssue() );
+ release = (Release) body.getReleases().get( 1 );
+ assertEquals( "Checking version of former release", "1.0", release.getVersion() );
+ assertEquals( "Checking date of former release", "2005-01-01", release.getDate() );
+ assertEquals( "Checking description of former release", "First release", release.getDescription() );
+ assertEquals( "Checking number of actions in former release", 1, release.getActions().size() );
+ action = (Action) release.getActions().get( 0 );
+ assertEquals( "Checking type of action of former release", "update", action.getType() );
+ assertEquals( "Checking developper of action of former release", "jruiz", action.getDev() );
+ assertEquals( "Checking description of action of former release",
+ "Uploaded documentation on how to use the plugin.", action.getDescription() );
+ assertEquals( "Checking number of duetos of action of former release", 0, action.getDuetos().size() );
+ assertEquals( "Checking number of fixes of action of former release", 1, action.getFixess().size() );
+ fixes = (Fixes) action.getFixess().get( 0 );
+ assertEquals( "Checking issue of fixes of action of former release", "MPJIRA-7", fixes.getIssue() );
+ }
+}
Index: src/test/resources/changes-old.xml
===================================================================
--- src/test/resources/changes-old.xml (r‚vision 425639)
+++ src/test/resources/changes-old.xml (copie de travail)
@@ -1,25 +1,26 @@
This field can be any String, such as "in SVN" when the version isn't yet released.
+ ]]> + + +This field should be the id of one of the developpers of the current project (as declared in the POM).
+ ]]> +