Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5199

Add possibility to "fake register" modules in ModuleVersionHandlerTestCase

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: 5.0.1
    • Fix Version/s: 5.0.2, 5.1
    • Component/s: testing
    • Labels:
      None
    • Magnolia Release:
      5.0.2, 5.1

      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).

        Attachments

          Activity

            People

            Assignee:
            pmundt Philip Mundt
            Reporter:
            pmundt Philip Mundt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: