Skip to content

Commit 0aa57e4

Browse files
committed
DataEventTest: make cross-platform
Remove *nix-style path.
1 parent 509ff2b commit 0aa57e4

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/test/java/org/scijava/io/event/DataEventTest.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@
2828
*/
2929
package org.scijava.io.event;
3030

31-
import org.junit.Test;
32-
3331
import static org.junit.Assert.assertEquals;
3432

33+
import java.io.File;
34+
import java.io.IOException;
35+
36+
import org.junit.Test;
37+
3538
public class DataEventTest {
3639

3740
@Test
38-
public void testDeprecatedMethods() {
39-
String localPath = "/local/absolute/path.txt";
41+
public void testDeprecatedMethods() throws IOException {
42+
File tmpFile = File.createTempFile("path", "txt");
43+
tmpFile.deleteOnExit();
44+
String localPath = tmpFile.getAbsolutePath();
4045
Object obj = null;
4146
DataOpenedEvent openedEvent = new DataOpenedEvent(localPath, obj);
4247
DataSavedEvent savedEvent = new DataSavedEvent(localPath, obj);

0 commit comments

Comments
 (0)