forked from devonfw/IDEasy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into devonfw#590-asciidoc
- Loading branch information
Showing
11 changed files
with
116 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 11 additions & 3 deletions
14
cli/src/test/java/com/devonfw/tools/ide/tool/java/JavaUrlUpdaterMock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
package com.devonfw.tools.ide.tool.java; | ||
|
||
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; | ||
|
||
/** | ||
* Mock of {@link JavaUrlUpdater} to allow integration testing with wiremock. | ||
*/ | ||
public class JavaUrlUpdaterMock extends JavaUrlUpdater { | ||
|
||
private final static String TEST_URL = "http://localhost:8080/"; | ||
private final String baseUrl; | ||
|
||
JavaUrlUpdaterMock(WireMockRuntimeInfo wireMockRuntimeInfo) { | ||
|
||
super(); | ||
this.baseUrl = wireMockRuntimeInfo.getHttpBaseUrl(); | ||
} | ||
|
||
@Override | ||
protected String getMirror() { | ||
|
||
return TEST_URL + "downloads/"; | ||
return this.baseUrl + "/downloads/"; | ||
} | ||
|
||
@Override | ||
protected String doGetVersionUrl() { | ||
|
||
return TEST_URL + "versions/"; | ||
return this.baseUrl + "/versions/"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
cli/src/test/java/com/devonfw/tools/ide/tool/npm/NpmUrlUpdaterMock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
package com.devonfw.tools.ide.tool.npm; | ||
|
||
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo; | ||
|
||
/** | ||
* Mock of {@link NpmUrlUpdater} to allow integration testing with wiremock. | ||
*/ | ||
public class NpmUrlUpdaterMock extends NpmUrlUpdater { | ||
|
||
private final static String TEST_URL = "http://localhost:8080/"; | ||
private final String baseUrl; | ||
|
||
NpmUrlUpdaterMock(WireMockRuntimeInfo wireMockRuntimeInfo) { | ||
super(); | ||
this.baseUrl = wireMockRuntimeInfo.getHttpBaseUrl() + "/"; | ||
} | ||
|
||
@Override | ||
protected String getBaseUrl() { | ||
|
||
return TEST_URL; | ||
return this.baseUrl; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters