• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

devonfw / IDEasy / 8144002629

04 Mar 2024 04:56PM UTC coverage: 58.928% (+0.7%) from 58.254%
8144002629

push

github

web-flow
#208: improve test infrastructure # 219: fix wrong executable (#238)

* Add first implementation

* Add javadoc

* Add javadoc

* Using target path instead of ressource path to make sure one-to-one copy of set up folders is used

* Add JavaDoc and mac mock program

* Add support for multiple dependencies while testing

* Minor changes

* Modify mock programs for testing

* Refactored example JmcTest

* Add possibility to set execution path by using the context

* Reenable test after related issue 228 has been merged

* Replace ternary with regular if

* Add missing javadoc

* Add missing javadoc

* remove unnecessary semicolon

* Fix spelling typo

* Minor test changes

* Refactoring FileExtractor class for more modularity

* using const

* Add missing extensions

* Remove unnecessary execption declaration and minor rename

* Fix spelling

* Add javadoc

* Forget dot

* minor change

* Revert "minor change"

This reverts commit ec81c3ce6.

* Revert "Merge branch 'main' into feature/208-MockOutToolRepoRefactorTestInfra"

This reverts commit d58847230, reversing
changes made to f38b3105f.

* Revert "Revert "Merge branch 'main' into feature/208-MockOutToolRepoRefactorTestInfra""

This reverts commit 3e49a0b3d.

* Revert "Revert "minor change""

This reverts commit 2f7b94624.

* fix typo

* #208: review and complete rework

* #208: improved system path

* #208: found and fixed bug on windows

* #208: improve OS mocking

* #208: improve test logging

reveal logs/errors so the developer actually sees what is happening instead of leaving them in the dark

* #208: improve OS detection

* #208: fixed

found and fixed bug in MacOS app detection for JMC, fixed copy file to folder bug, moved !extract logic back to FileAccess, f... (continued)

1580 of 2930 branches covered (53.92%)

Branch coverage included in aggregate %.

4047 of 6619 relevant lines covered (61.14%)

2.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.77
cli/src/main/java/com/devonfw/tools/ide/environment/EnvironmentVariablesResolved.java
1
package com.devonfw.tools.ide.environment;
2

3
import com.devonfw.tools.ide.variable.IdeVariables;
4
import com.devonfw.tools.ide.variable.VariableDefinition;
5

6
import java.util.Set;
7

8
/**
9
 * Implementation of {@link EnvironmentVariables} that resolves variables recursively.
10
 */
11
public class EnvironmentVariablesResolved extends AbstractEnvironmentVariables {
12

13
  /**
14
   * The constructor.
15
   *
16
   * @param parent the parent {@link EnvironmentVariables} to inherit from.
17
   */
18
  EnvironmentVariablesResolved(AbstractEnvironmentVariables parent) {
19

20
    super(parent, parent.context);
5✔
21
  }
1✔
22

23
  @Override
24
  public EnvironmentVariablesType getType() {
25

26
    return EnvironmentVariablesType.RESOLVED;
2✔
27
  }
28

29
  @Override
30
  public String getFlat(String name) {
31

32
    return null;
2✔
33
  }
34

35
  @Override
36
  public String get(String name) {
37

38
    String value = getValue(name);
4✔
39
    if (value != null) {
2✔
40
      value = resolve(value, name);
5✔
41
    }
42
    return value;
2✔
43
  }
44

45
  @Override
46
  public EnvironmentVariables resolved() {
47

48
    return this;
×
49
  }
50

51
  @Override
52
  protected void collectVariables(Set<String> variables) {
53

54
    for (VariableDefinition<?> var : IdeVariables.VARIABLES) {
10✔
55
      if (var.isExport() || var.isForceDefaultValue()) {
6✔
56
        variables.add(var.getName());
5✔
57
      }
58
    }
1✔
59
    super.collectVariables(variables);
3✔
60
  }
1✔
61

62
  @Override
63
  protected boolean isExported(String name) {
64

65
    VariableDefinition<?> var = IdeVariables.get(name);
3✔
66
    if ((var != null) && var.isExport()) {
5✔
67
      return true;
2✔
68
    }
69
    return super.isExported(name);
4✔
70
  }
71
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc