Re: Write to disk in Platform based JUnit tests

Johannes Wahle <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Did you add this to your normal dependencies or your test dependencies?
According to the Javadoc of FileUtil.toFileObject at 
http://bits.netbeans.org/7.4/javadoc/org-openide-filesystems/org/openide/filesystems/FileUtil.html#toFileObject(java.io.File)
this should enable you to at least use FileUtil.toFileObject in your tests:
(You can check that this works, by verifying that fo != null)

File f = file existing on disc
FileObject fo = FileUtil.toFileObject(f);
FileUtil.createData(fo, path);

On 01.12.2015 15:07, mhaslinger wrote:
> This dependency is already added with Option "Include in Compile Classpath" enabled. (have tried it without - makes no difference)
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.