You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Stefan Seelmann (JIRA)" <ji...@apache.org> on 2010/09/14 19:56:33 UTC

[jira] Created: (DIRSERVER-1550) Use JUnit TemporaryFolder Rule

Use JUnit TemporaryFolder Rule
------------------------------

                 Key: DIRSERVER-1550
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1550
             Project: Directory ApacheDS
          Issue Type: Improvement
            Reporter: Stefan Seelmann
            Assignee: Stefan Seelmann


In many tests we need to create temporary files and folders. We use methods like:
  File.createTempFile() 
  File.deleteOnExit() 
  File.delete()
  org.apache.commons.io.FileUtils.deleteDirectory()

JUnit 4.7 introduced the TemporaryFolder Rule: http://kentbeck.github.com/junit/javadoc/latest/org/junit/rules/TemporaryFolder.html that guarantees that files and folders are delteted after each test. We should use this rule and remove all handmade temporary file code.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.