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 2024/10/16 15:55:17 UTC
(maven-dependency-plugin) branch temp created (now df01618b)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch temp
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git
at df01618b Convert to JUnit 5
This branch includes the following new commits:
new df01618b Convert to JUnit 5
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-dependency-plugin) 01/01: Convert to JUnit 5
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch temp
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git
commit df01618b2d704c6cc630bfc4cee08c5bfe63d419
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Wed Oct 16 11:55:06 2024 -0400
Convert to JUnit 5
---
.../utils/filters/TestResolveMarkerFileFilter.java | 36 ++++++++--------------
1 file changed, 13 insertions(+), 23 deletions(-)
diff --git a/src/test/java/org/apache/maven/plugins/dependency/utils/filters/TestResolveMarkerFileFilter.java b/src/test/java/org/apache/maven/plugins/dependency/utils/filters/TestResolveMarkerFileFilter.java
index 25e62935..10bce1a3 100644
--- a/src/test/java/org/apache/maven/plugins/dependency/utils/filters/TestResolveMarkerFileFilter.java
+++ b/src/test/java/org/apache/maven/plugins/dependency/utils/filters/TestResolveMarkerFileFilter.java
@@ -20,46 +20,36 @@ package org.apache.maven.plugins.dependency.utils.filters;
import java.io.File;
import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-import junit.framework.TestCase;
-import org.apache.commons.io.FileUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.plugin.testing.SilentLog;
import org.apache.maven.plugins.dependency.testUtils.DependencyArtifactStubFactory;
import org.apache.maven.plugins.dependency.utils.markers.SourcesFileMarkerHandler;
import org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* @author brianf
*/
-public class TestResolveMarkerFileFilter extends TestCase {
- Set<Artifact> artifacts = new HashSet<>();
-
- Log log = new SilentLog();
+public class TestResolveMarkerFileFilter {
+ @TempDir
File outputFolder;
DependencyArtifactStubFactory fact;
- protected void setUp() throws Exception {
- super.setUp();
-
- outputFolder = new File("target/markers/");
- FileUtils.deleteDirectory(outputFolder);
- assertFalse(outputFolder.exists());
-
- this.fact = new DependencyArtifactStubFactory(outputFolder, false);
- artifacts = fact.getReleaseAndSnapshotArtifacts();
- }
-
- protected void tearDown() throws IOException {
- FileUtils.deleteDirectory(outputFolder);
+ @BeforeEach
+ protected void setUp() throws IOException {
+ fact = new DependencyArtifactStubFactory(outputFolder, false);
+ fact.getReleaseAndSnapshotArtifacts();
}
+ @Test
public void testResolveFile() throws IOException, ArtifactFilterException, MojoExecutionException {
SourcesFileMarkerHandler handler = new SourcesFileMarkerHandler(outputFolder);