sparsick commented on code in PR #579:
URL: https://github.com/apache/maven-war-plugin/pull/579#discussion_r2494946447


##########
src/test/java/org/apache/maven/plugins/war/WarExplodedMojoFilteringTest.java:
##########
@@ -37,47 +37,63 @@
  * under the License.
  */
 
+import org.apache.maven.api.di.Provides;
+import org.apache.maven.api.plugin.testing.InjectMojo;
+import org.apache.maven.api.plugin.testing.MojoTest;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.plugins.war.stub.MavenProjectBasicStub;
+import org.apache.maven.plugins.war.stub.ResourceStub;
+import org.codehaus.plexus.util.FileUtils;
+import org.junit.jupiter.api.Test;
+
+import javax.inject.Inject;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.StringReader;
-import java.util.LinkedList;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Properties;
 
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.plugins.war.stub.MavenProjectBasicStub;
-import org.apache.maven.plugins.war.stub.ResourceStub;
-import org.codehaus.plexus.util.FileUtils;
+import static org.apache.maven.api.plugin.testing.MojoExtension.getBasedir;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.when;
 
 /**
  * @author Olivier Lamy
  * @since 21 juil. 2008
  */
-public class WarExplodedMojoFilteringTest extends AbstractWarExplodedMojoTest {
+@MojoTest
+public class WarExplodedMojoFilteringTest {
 
-    protected File getPomFile() {
-        return new File(getBasedir(), 
"/target/test-classes/unit/warexplodedmojo/plugin-config.xml");
-    }
+    @Inject

Review Comment:
   @slawekjaranowski I'm trying to inject an own list (see line 80) because the 
tests will modify it. But the DI is ignoring it. Any hints for me on how I can 
inject my own list? Thank you in advance.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to