ascheman commented on code in PR #11549:
URL: https://github.com/apache/maven/pull/11549#discussion_r2616895000


##########
impl/maven-core/src/test/java/org/apache/maven/internal/impl/DefaultProjectManagerTest.java:
##########
@@ -56,7 +57,15 @@ void attachArtifact() {
         
when(artifact.getBaseVersion()).thenReturn(versionParser.parseVersion("1.0-SNAPSHOT"));
         projectManager.attachArtifact(project, artifact, path);
 
+        // Verify that no exception is thrown when only the arficactId differ
         when(artifact.getArtifactId()).thenReturn("anotherArtifact");
-        assertThrows(IllegalArgumentException.class, () -> 
projectManager.attachArtifact(project, artifact, path));
+        projectManager.attachArtifact(project, artifact, path);
+
+        when(artifact.getGroupId()).thenReturn("anotherGroup");

Review Comment:
   Would you mind adding a comment similar to L60 ('// Verify ...') here to 
make clear that the second part of the test case starts here. Or make even a 
second test case out of it?



-- 
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