From d7dc137029de4ae1f10375c27b04ace804cd3353 Mon Sep 17 00:00:00 2001 From: jan-vcapgemini Date: Tue, 1 Oct 2024 17:07:40 +0200 Subject: [PATCH] #669: Attempt to fix background script moved checkInstallation before run test validation --- .../tools/ide/tool/androidstudio/AndroidStudioTest.java | 3 +-- .../com/devonfw/tools/ide/tool/intellij/IntellijTest.java | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cli/src/test/java/com/devonfw/tools/ide/tool/androidstudio/AndroidStudioTest.java b/cli/src/test/java/com/devonfw/tools/ide/tool/androidstudio/AndroidStudioTest.java index 819cff470..e2ac4eabd 100644 --- a/cli/src/test/java/com/devonfw/tools/ide/tool/androidstudio/AndroidStudioTest.java +++ b/cli/src/test/java/com/devonfw/tools/ide/tool/androidstudio/AndroidStudioTest.java @@ -72,10 +72,9 @@ public void testAndroidStudioRun(String os, WireMockRuntimeInfo wmRuntimeInfo) t commandlet.run(); // assert + checkInstallation(this.context); assertThat(commandlet.getToolBinPath().resolve("android-studio-test")).hasContent( ANDROID_STUDIO + " " + this.context.getSystemInfo().getOs() + " " + this.context.getWorkspacePath()); - - checkInstallation(this.context); } private void checkInstallation(IdeTestContext context) { diff --git a/cli/src/test/java/com/devonfw/tools/ide/tool/intellij/IntellijTest.java b/cli/src/test/java/com/devonfw/tools/ide/tool/intellij/IntellijTest.java index 1aca04564..9e292be8a 100644 --- a/cli/src/test/java/com/devonfw/tools/ide/tool/intellij/IntellijTest.java +++ b/cli/src/test/java/com/devonfw/tools/ide/tool/intellij/IntellijTest.java @@ -131,11 +131,9 @@ public void testIntellijRun(String os, WireMockRuntimeInfo wmRuntimeInfo) throws commandlet.run(); // assert - SystemInfo currentSystemInfo = this.context.getSystemInfo(); - Path workspacePath = this.context.getWorkspacePath(); - assertThat(commandlet.getToolBinPath().resolve("intellijtest")).hasContent( - "intellij " + currentSystemInfo.getOs() + " " + workspacePath); checkInstallation(this.context); + assertThat(commandlet.getToolBinPath().resolve("intellijtest")).hasContent( + "intellij " + this.context.getSystemInfo().getOs() + " " + this.context.getWorkspacePath()); } private void checkInstallation(IdeTestContext context) {