raupachz commented on code in PR #183:
URL: https://github.com/apache/maven-enforcer/pull/183#discussion_r963771388


##########
enforcer-rules/src/test/java/org/apache/maven/plugins/enforcer/TestRequireFilesDontExist.java:
##########
@@ -136,6 +136,34 @@ public void testFileDoesNotExist()
         rule.execute( EnforcerTestUtils.getHelper() );
     }
 
+    @Test
+    public void testFileDoesNotExistSatisfyAny()
+            throws IOException
+    {
+        File f = File.createTempFile( "junit", null, temporaryFolder );
+        f.delete();
+
+        assertFalse( f.exists() );
+
+        File g = File.createTempFile( "junit", null, temporaryFolder );
+
+        assertTrue( g.exists() );
+
+        rule.setFiles( new File[] { f, g.getCanonicalFile() } );
+        rule.setSatisfyAny(true);
+
+        try
+        {
+            rule.execute( EnforcerTestUtils.getHelper() );
+        }
+        catch ( EnforcerRuleException e )
+        {
+            fail( "Unexpected Exception:" + e.getLocalizedMessage() );
+        }
+
+        g.delete();

Review Comment:
   Just went with flow. Alright. Will remove the `g.delete()`.



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