[MAGNOLIA-5199] Add possibility to "fake register" modules in ModuleVersionHandlerTestCase Created: 24/Jul/13  Updated: 29/Jul/13  Resolved: 25/Jul/13

Status: Closed
Project: Magnolia
Component/s: testing
Affects Version/s: 5.0.1
Fix Version/s: 5.0.2, 5.1

Type: Improvement Priority: Neutral
Reporter: Philip Mundt Assignee: Philip Mundt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

If a ModuleVersionHandler is using an install task which checks if a module is installed (see code), it can be difficult to test this in the respective ModuleVersionHandlerTest:

ConditionalDelegateTask("", "", new Task()) {
  @Override
  protected boolean condition(InstallContext installContext) throws TaskExecutionException {
    return installContext.isModuleRegistered("modulename");
  }
})

We should add a way to "fake register" a module, so that we can test DeltaBuilder updates in ModuleVersionHandlerTest(s).


Generated at Mon Feb 12 04:02:55 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.