slawekjaranowski commented on a change in pull request #9:
URL: https://github.com/apache/maven-verifier/pull/9#discussion_r825309513



##########
File path: src/main/java/org/apache/maven/it/Verifier.java
##########
@@ -1768,6 +1869,30 @@ private static void runIntegrationTest( Verifier 
verifier )
         System.out.println( "OK" );
     }
 
+    /**
+     * Verifies that the artifact given by its Maven coordinates exists and 
contains the given content.
+     * 
+     * @param groupId the groupId of the artifact (must not be null)
+     * @param artifactId the artifactId of the artifact (must not be null)
+     * @param version the version of the artifact (must not be null)
+     * @param ext the extension of the artifact (must not be null)
+     * @param content the expected content
+     * @throws IOException in case reading from the artifact fails 
+     * @throws VerificationException if the content of the artifact differs
+     */
+    public void verifyArtifactContent( String groupId, String artifactId, 
String version, String ext, String content )
+        throws IOException, VerificationException
+    {
+        String fileName = getArtifactPath( groupId, artifactId, version, ext );
+        if ( content.equals( FileUtils.fileRead( fileName ) ) )
+        {
+            throw new VerificationException( "Content of " + fileName + " does 
not equal " + content );
+        }
+    }
+
+    /**
+     * @deprecated Use {@link #verifyArtifactContent(String, String, String, 
String, String)} instead.
+     */

Review comment:
       missing deprecated annotation 😉




-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to