Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 919c83b

Browse files
committed
Make test platform independent
1 parent bcad6ac commit 919c83b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cypher-shell/src/test/java/org/neo4j/shell/cli/FileHistorianTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import static java.lang.System.getProperty;
1818
import static org.junit.Assert.assertEquals;
1919
import static org.junit.Assert.assertNotNull;
20+
import static org.mockito.Matchers.contains;
2021
import static org.mockito.Mockito.doReturn;
2122
import static org.mockito.Mockito.mock;
2223
import static org.mockito.Mockito.verify;
@@ -46,11 +47,11 @@ public void defaultHistoryFile() throws Exception {
4647
@Test
4748
public void noHistoryFileGivesMemoryHistory() throws Exception {
4849
Historian historian = FileHistorian.setupHistory(reader, logger,
49-
new File("/temp/aasbzs/asfaz/asdfasvzx/asfdasdf/asdfasd"));
50+
Paths.get("temp", "aasbzs", "asfaz").toFile());
5051

5152
assertNotNull(historian);
5253

53-
verify(logger).printError("Could not load history file. Falling back to session-based history.\n" +
54-
"Failed to create directory for history: /temp/aasbzs/asfaz/asdfasvzx/asfdasdf");
54+
verify(logger).printError(contains("Could not load history file. Falling back to session-based history.\n" +
55+
"Failed to create directory for history"));
5556
}
5657
}

0 commit comments

Comments
 (0)