diff --git a/src/test/java/ch/ivyteam/ivy/maven/test/TestStartEngine.java b/src/test/java/ch/ivyteam/ivy/maven/test/TestStartEngine.java index 915d0dc4..66f38504 100644 --- a/src/test/java/ch/ivyteam/ivy/maven/test/TestStartEngine.java +++ b/src/test/java/ch/ivyteam/ivy/maven/test/TestStartEngine.java @@ -47,7 +47,8 @@ public void canStartEngine() throws Exception { Executor startedProcess = null; try { startedProcess = mojo.startEngine(); - assertThat(getProperty(EngineControl.Property.TEST_ENGINE_URL)).startsWith("http://") + assertThat(getProperty(EngineControl.Property.TEST_ENGINE_URL)) + .startsWith("http://") .endsWith("/"); assertThat(Path.of(getProperty(EngineControl.Property.TEST_ENGINE_LOG))).exists(); } finally { @@ -150,9 +151,10 @@ public void startEngine_copyEngineToTarget() throws Exception { try { mojo.testEngine = TestEngineLocation.COPY_FROM_TEMPLATE; var engineDirTarget = mojo.getEngineDir(mojo.project); - assertThat(engineDirTarget.toString()).contains("/target/ivyEngine"); + assertThat(engineDirTarget) + .endsWith(Path.of("target").resolve("ivyEngine")) + .doesNotExist(); - assertThat(engineDirTarget).doesNotExist(); startedProcess = mojo.startEngine(); assertThat(engineDirTarget).exists(); } finally { @@ -169,9 +171,9 @@ public void startEngine_targetDirectoryNotClean() throws Exception { Executor startedProcess = null; try { var engineDirTarget = mojo.getEngineDir(mojo.project); - assertThat(engineDirTarget.toString()).contains("/target/ivyEngine"); - - assertThat(engineDirTarget).doesNotExist(); + assertThat(engineDirTarget) + .endsWith(Path.of("/target/ivyEngine")) + .doesNotExist(); assertThat(log.getWarnings().toString()).doesNotContain("Skipping copy"); startedProcess = mojo.startEngine();