You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2025/01/05 12:49:57 UTC

(maven-changelog-plugin) branch master updated: Every test runs with a new test object (#34)

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-changelog-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 8824985  Every test runs with a new test object (#34)
8824985 is described below

commit 882498550a0b933419176587beb51dd63565e656
Author: Elliotte Rusty Harold <el...@users.noreply.github.com>
AuthorDate: Sun Jan 5 12:49:52 2025 +0000

    Every test runs with a new test object (#34)
---
 .../maven/plugins/changelog/ChangeLogReportTest.java | 20 +-------------------
 .../changelog/DeveloperActivityReportTest.java       | 20 +-------------------
 .../plugins/changelog/FileActivityReportTest.java    | 20 +-------------------
 3 files changed, 3 insertions(+), 57 deletions(-)

diff --git a/src/test/java/org/apache/maven/plugins/changelog/ChangeLogReportTest.java b/src/test/java/org/apache/maven/plugins/changelog/ChangeLogReportTest.java
index 99a7dc4..3b3507e 100644
--- a/src/test/java/org/apache/maven/plugins/changelog/ChangeLogReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/changelog/ChangeLogReportTest.java
@@ -32,25 +32,7 @@ import org.codehaus.plexus.util.FileUtils;
  * @author Edwin Punzalan
  */
 public class ChangeLogReportTest extends AbstractChangeLogReportTest {
-    private ScmManager scmManager;
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        scmManager = new ScmManagerStub();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        scmManager = null;
-    }
+    private ScmManager scmManager = new ScmManagerStub();
 
     public void testNoSource() throws Exception {
         File pluginXmlFile = new File(getBasedir(), "src/test/plugin-configs/changelog/no-source-plugin-config.xml");
diff --git a/src/test/java/org/apache/maven/plugins/changelog/DeveloperActivityReportTest.java b/src/test/java/org/apache/maven/plugins/changelog/DeveloperActivityReportTest.java
index 3978a18..a869bee 100644
--- a/src/test/java/org/apache/maven/plugins/changelog/DeveloperActivityReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/changelog/DeveloperActivityReportTest.java
@@ -28,25 +28,7 @@ import org.codehaus.plexus.util.FileUtils;
  * @author Edwin Punzalan
  */
 public class DeveloperActivityReportTest extends AbstractChangeLogReportTest {
-    private ScmManager scmManager;
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        scmManager = new ScmManagerStub();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        scmManager = null;
-    }
+    private ScmManager scmManager = new ScmManagerStub();
 
     public void testNoSource() throws Exception {
         File pluginXmlFile = new File(getBasedir(), "src/test/plugin-configs/dev-activity/no-source-plugin-config.xml");
diff --git a/src/test/java/org/apache/maven/plugins/changelog/FileActivityReportTest.java b/src/test/java/org/apache/maven/plugins/changelog/FileActivityReportTest.java
index 17de5b0..fa75eab 100644
--- a/src/test/java/org/apache/maven/plugins/changelog/FileActivityReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/changelog/FileActivityReportTest.java
@@ -28,25 +28,7 @@ import org.codehaus.plexus.util.FileUtils;
  * @author Edwin Punzalan
  */
 public class FileActivityReportTest extends AbstractChangeLogReportTest {
-    private ScmManager scmManager;
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        scmManager = new ScmManagerStub();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-
-        scmManager = null;
-    }
+    private ScmManager scmManager = new ScmManagerStub();
 
     public void testNoSource() throws Exception {
         File pluginXmlFile =