This is an automated email from the ASF dual-hosted git repository. ntimofeev pushed a commit to branch STABLE-4.1 in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/STABLE-4.1 by this push: new 92685f2 Fix test on Windows 92685f2 is described below commit 92685f23a81e32a795e6e74233e1785ce956ee7b Author: Nikita Timofeev <stari...@gmail.com> AuthorDate: Wed Dec 15 16:54:48 2021 +0300 Fix test on Windows --- .../org/apache/cayenne/gen/xml/CgenSaverDelegateTest.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/cayenne-cgen/src/test/java/org/apache/cayenne/gen/xml/CgenSaverDelegateTest.java b/cayenne-cgen/src/test/java/org/apache/cayenne/gen/xml/CgenSaverDelegateTest.java index 1c17103..2a631c6 100644 --- a/cayenne-cgen/src/test/java/org/apache/cayenne/gen/xml/CgenSaverDelegateTest.java +++ b/cayenne-cgen/src/test/java/org/apache/cayenne/gen/xml/CgenSaverDelegateTest.java @@ -27,21 +27,18 @@ import org.junit.Test; import static org.junit.Assert.*; -/** - * @since 4.2 - */ public class CgenSaverDelegateTest { @Test public void testExistingRootOverride() throws Exception { CgenConfiguration config = new CgenConfiguration(false); - config.setRootPath(Paths.get("/tmp/src/main/java")); + config.setRootPath(Paths.get("/tmp/src/main/java").toAbsolutePath()); URL baseURL = Paths.get("/tmp/src/main/resources").toUri().toURL(); CgenSaverDelegate.resolveOutputDir(baseURL, config); - assertEquals(Paths.get("/tmp/src/main/resources"), config.getRootPath()); + assertEquals(Paths.get("/tmp/src/main/resources").toAbsolutePath(), config.getRootPath()); assertEquals(Paths.get("../java"), config.getRelPath()); } @@ -49,14 +46,14 @@ public class CgenSaverDelegateTest { public void testExistingRootAndRelPath() throws Exception { CgenConfiguration config = new CgenConfiguration(false); - config.setRootPath(Paths.get("/tmp/src/main/java")); + config.setRootPath(Paths.get("/tmp/src/main/java").toAbsolutePath()); config.setRelPath(Paths.get("")); URL baseURL = Paths.get("/tmp/src/main/resources").toUri().toURL(); CgenSaverDelegate.resolveOutputDir(baseURL, config); - assertEquals(Paths.get("/tmp/src/main/resources"), config.getRootPath()); + assertEquals(Paths.get("/tmp/src/main/resources").toAbsolutePath(), config.getRootPath()); assertEquals(Paths.get("../java"), config.getRelPath()); } @@ -68,9 +65,8 @@ public class CgenSaverDelegateTest { CgenSaverDelegate.resolveOutputDir(baseURL, config); - assertEquals(Paths.get("/tmp/src/main/resources"), config.getRootPath()); + assertEquals(Paths.get("/tmp/src/main/resources").toAbsolutePath(), config.getRootPath()); assertEquals(Paths.get(""), config.getRelPath()); } - } \ No newline at end of file