[ 
https://issues.apache.org/jira/browse/IO-417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13848180#comment-13848180
 ] 

Sebb commented on IO-417:
-------------------------

I don't know. 
Is there a path that is guaranteed to throw an IOException on Unix? Does the 
same path work for other OSes?

There are perhaps other ways to cause forceMkdir() to fail as part of a Unit 
test, e.g. using ACLs or locking, or only running the test on Windows, but I 
don't think there is a path constant that will do the job.

Besides, if the only use case is for unit testing, I don't think the constant 
belongs in the main library.

> FileNameUtils Invalid File Name
> -------------------------------
>
>                 Key: IO-417
>                 URL: https://issues.apache.org/jira/browse/IO-417
>             Project: Commons IO
>          Issue Type: Wish
>          Components: Utilities
>            Reporter: BELUGA BEHR
>            Priority: Trivial
>
> Create a constant String (or file) that has an invalid file and/or directory. 
>  The file path used must be invalid on both Windows and *nix.
> Would be used for testing.  I have done something similar when I'm unit 
> testing a method that uses: FileUtils#forceMkDir().
> My unit tests expect the IOException.
> Thanks.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to