elharo commented on code in PR #343:
URL: https://github.com/apache/maven-enforcer/pull/343#discussion_r1938278197


##########
enforcer-rules/src/test/java/org/apache/maven/enforcer/rules/files/TestRequireFilesSize.java:
##########
@@ -116,7 +122,7 @@ void testEmptyFileList() throws EnforcerRuleException, 
IOException {
     void testFileDoesNotExist() throws IOException {
         File f = File.createTempFile("junit", null, temporaryFolder);
         f.delete();
-        assertFalse(f.exists());
+        assumeFalse(f.exists());

Review Comment:
   Yes, we don't want to test that the JDK's delete method works as expected, 
and if the code under test isn't even executed then the test has been skipped, 
not failed. This case inspired me to write 
https://cafe.elharo.com/testing/assume-vs-assert/ 



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