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]> |
Oh, and it says: disable "Include in Compile Classpath" On 01.12.2015 16:11, Johannes Wahle wrote: > 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) >> >