Skip to content

Conversation

@SDallmann
Copy link
Contributor

@SDallmann SDallmann commented Feb 6, 2026

This PR fixes #1703

In order to be able create projects while using the SNAPSHOT version, said version was permitted during the verification of the minimum required version. This change affected some Unit Tests, which had to be adapted.

Implemented changes:

  1. In .../AbstractIdeContext.java: allowed SNAPSHOT during the verification of the minimum required version.
  2. In .../IdeVersion.java: added a method to mock the current version from SNAPSHOT to a specific version (setMockVersionForTesting(..)) and a method to reset the version back to SNAPSHOT (setSnapshotVersionForTesting()).
  3. Moved and renamed the test testIdeVersionTooSmall() from .../IdeContextTest.java to .../CreateCommandletTest.java as testIdeVersionTooOldForExistingProject().
  4. Renamed the test testIdeVersionTooSmall() from .../CreateCommandletTest.java to testIdeVersionTooOldOnProjectCreation().
  5. Adapted both tests from 3. and 4. to use the methods added in 2.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 21754609702

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 39 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.005%) to 70.451%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/git/GitUrl.java 3 87.93%
com/devonfw/tools/ide/context/AbstractIdeContext.java 16 67.19%
com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java 20 82.04%
Totals Coverage Status
Change from base Build 21513109358: 0.005%
Covered Lines: 10496
Relevant Lines: 14312

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

Allow usage of SNAPSHOT-version to create new projects

2 participants