Write to disk in Platform based JUnit tests
"mhaslinger" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <[email protected]> |
Already some weeks back we found the solution to our Problem:
The Netbeans user Directory has to be set an then any Location (temp dir or specific path) can be used:
Code:
public void setUp() throws IOException {
Path userDir = Files.createTempDirectory("userConfigTemp");
System.setProperty("netbeans.user", userDir.toString());
}
Do not Forget to cleanup the temp dir afterwards.