You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Pierre-Arnaud Marcelot (JIRA)" <ji...@apache.org> on 2011/05/05 09:44:05 UTC

[jira] [Updated] (DIRSHARED-66) Use JUnit TemporaryFolder Rule

     [ https://issues.apache.org/jira/browse/DIRSHARED-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierre-Arnaud Marcelot updated DIRSHARED-66:
--------------------------------------------

    Fix Version/s:     (was: 1.0.0-M3)
                   1.0.0-M4

> Use JUnit TemporaryFolder Rule
> ------------------------------
>
>                 Key: DIRSHARED-66
>                 URL: https://issues.apache.org/jira/browse/DIRSHARED-66
>             Project: Directory Shared
>          Issue Type: Improvement
>            Reporter: Stefan Seelmann
>            Assignee: Stefan Seelmann
>             Fix For: 1.0.0-M4
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira