-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
282 additions
and
82 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
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
58 changes: 58 additions & 0 deletions
58
cli/src/test/java/com/devonfw/tools/ide/tool/eclipse/EclipseTest.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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.devonfw.tools.ide.tool.eclipse; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Path; | ||
|
||
import org.junit.jupiter.params.ParameterizedTest; | ||
import org.junit.jupiter.params.provider.ValueSource; | ||
|
||
import com.devonfw.tools.ide.context.AbstractIdeContextTest; | ||
import com.devonfw.tools.ide.context.IdeTestContext; | ||
import com.devonfw.tools.ide.os.SystemInfo; | ||
import com.devonfw.tools.ide.os.SystemInfoMock; | ||
import com.devonfw.tools.ide.tool.intellij.Intellij; | ||
|
||
/** | ||
* Integration test of {@link Eclipse}. | ||
*/ | ||
public class EclipseTest extends AbstractIdeContextTest { | ||
|
||
private static final String PROJECT_ECLIPSE = "eclipse"; | ||
|
||
/** | ||
* Tests if the {@link Intellij} can be installed properly. | ||
* | ||
* @param os String of the OS to use. | ||
* @throws IOException if reading the content of the mocked plugin fails | ||
*/ | ||
@ParameterizedTest | ||
@ValueSource(strings = { "windows", "mac", "linux" }) | ||
public void testEclipse(String os) throws IOException { | ||
|
||
// arrange | ||
SystemInfo systemInfo = SystemInfoMock.of(os); | ||
IdeTestContext context = newContext(PROJECT_ECLIPSE, "eclipseproject"); | ||
context.setSystemInfo(systemInfo); | ||
context.getStartContext().setForceMode(true); // #663 | ||
Eclipse eclipse = context.getCommandletManager().getCommandlet(Eclipse.class); | ||
|
||
// act | ||
eclipse.run(); | ||
|
||
// assert | ||
Path eclipsePath = context.getSoftwarePath().resolve("eclipse"); | ||
assertThat(eclipsePath.resolve(".ide.software.version")).exists().hasContent("2024-09"); | ||
assertThat(context).logAtSuccess().hasEntries("Successfully installed java in version 17.0.10_7", | ||
"Successfully installed eclipse in version 2024-09"); | ||
assertThat(context).logAtSuccess().hasMessage("Successfully ended step 'Install plugin anyedit'."); | ||
assertThat(context.getPluginsPath().resolve("eclipse")).isDirectory(); | ||
assertThat(eclipsePath.resolve("eclipsetest")).hasContent( | ||
"eclipse " + os + " -data " + context.getWorkspacePath() + " -keyring " + context.getUserHome().resolve(".eclipse").resolve(".keyring") | ||
+ " -configuration " + context.getPluginsPath().resolve("eclipse").resolve("configuration") + " gui -showlocation eclipseproject"); | ||
|
||
//if tool already installed | ||
eclipse.install(); | ||
assertThat(context).logAtDebug().hasMessage("Version 2024-09 of tool eclipse is already installed"); | ||
} | ||
|
||
} |
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
1 change: 1 addition & 0 deletions
1
cli/src/test/resources/ide-projects/eclipse/_ide/urls/eclipse/eclipse/2024-09/urls
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
https://downloads.eclipse.org/dummytest |
1 change: 1 addition & 0 deletions
1
cli/src/test/resources/ide-projects/eclipse/_ide/urls/java/java/17.0.10_7/urls
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
https://adoptium.net/download/dummytest |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
this is the download metadata |
1 change: 1 addition & 0 deletions
1
cli/src/test/resources/ide-projects/eclipse/eclipseproject/conf/ide.properties
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
M2_REPO=~/.m2/repository |
4 changes: 4 additions & 0 deletions
4
...resources/ide-projects/eclipse/eclipseproject/settings/eclipse/plugins/anyedit.properties
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugin_url=https://raw.githubusercontent.com/iloveeclipse/plugins/latest/ | ||
plugin_id=AnyEditTools.feature.group | ||
plugin_active=true | ||
tags=productivity,diff |
4 changes: 4 additions & 0 deletions
4
...esources/ide-projects/eclipse/eclipseproject/settings/eclipse/plugins/devstyle.properties
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugin_url=https://www.genuitec.com/updates/devstyle/ci/ | ||
plugin_id=com.genuitec.eclipse.theming.core.feature.feature.group | ||
plugin_active=false | ||
tags=style |
2 changes: 2 additions & 0 deletions
2
cli/src/test/resources/ide-projects/eclipse/eclipseproject/settings/ide.properties
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
JAVA_VERSION=17.0.10_7 | ||
ECLIPSE_VERSION=* |
1 change: 1 addition & 0 deletions
1
cli/src/test/resources/ide-projects/eclipse/eclipseproject/workspaces/main/readme
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
this is the main workspace of eclipse test case |
Oops, something went wrong.