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' of https://github.com/devonfw/IDEasy into feature/d…
…evonfw#139-feature-for-making-symlinks-relative # Conflicts: # cli/src/main/java/com/devonfw/tools/ide/io/FileAccessImpl.java
- Loading branch information
Showing
4 changed files
with
95 additions
and
2 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
55 changes: 55 additions & 0 deletions
55
cli/src/test/java/com/devonfw/tools/ide/commandlet/ContextCommandletTest.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,55 @@ | ||
package com.devonfw.tools.ide.commandlet; | ||
|
||
import java.util.Locale; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import com.devonfw.tools.ide.context.AbstractIdeContext; | ||
import com.devonfw.tools.ide.context.AbstractIdeContextTest; | ||
import com.devonfw.tools.ide.context.IdeContextConsole; | ||
|
||
public class ContextCommandletTest extends AbstractIdeContextTest { | ||
|
||
/** | ||
* Test of {@link ContextCommandlet} has name context. | ||
*/ | ||
@Test | ||
public void testNameIsContext(){ | ||
//arrange | ||
ContextCommandlet cxt = new ContextCommandlet(); | ||
//act & assert | ||
assertThat(cxt.getName()).isEqualTo("context"); | ||
} | ||
|
||
/** | ||
* Test of {@link ContextCommandlet} does not require home. | ||
*/ | ||
@Test | ||
public void testThatHomeIsNotReqired() { | ||
|
||
// arrange | ||
ContextCommandlet cxt = new ContextCommandlet(); | ||
//act & assert | ||
assertThat(cxt.isIdeHomeRequired()).isFalse(); | ||
} | ||
|
||
/** | ||
* Test of {@link ContextCommandlet} run. | ||
*/ | ||
@Test | ||
public void testRun() { | ||
|
||
// arrange | ||
ContextCommandlet cxt = new ContextCommandlet(); | ||
// act | ||
cxt.run(); | ||
// assert | ||
assertThat(cxt.getIdeContext()).isInstanceOf(IdeContextConsole.class); | ||
assertThat(cxt.getIdeContext().isForceMode()).isFalse(); | ||
assertThat(cxt.getIdeContext().isBatchMode()).isFalse(); | ||
assertThat(cxt.getIdeContext().isQuietMode()).isFalse(); | ||
assertThat(cxt.getIdeContext().isOfflineMode()).isFalse(); | ||
assertThat(cxt.getIdeContext().getLocale()).isEqualTo(Locale.getDefault()); | ||
|
||
} | ||
} |
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