I had a strange problem ...
I have a JUnit that implements several tests. This class is as follows:
public class MyTest { @Rule public TemporaryFolder folder = new TemporaryFolder(); @Test public void myTest1() throws IOException { String destinationPath = folder.newFile("destination1.txt").getPath();
This test class was used to work in my previous environment and still works in Continuum.
However, when starting from Eclipse, none, none, or all tests arbitrarily throw an IOException , for example:
java.io.IOException: The system cannot find the path specified at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:883) at org.junit.rules.TemporaryFolder.newFile(TemporaryFolder.java:53) at MyTest.myTest2(MyTest.java:50)
I have the same problem with running JUnit 4.9 or JUnit 4.10 ...
How can I fix this so that it works correctly?
java junit junit4 ioexception
Jean logeart
source share