Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-3614

Make JSONEnhancedConfig as an OSGi service; use DI instead of static newInstance call

    Details

    • Story Points:
      1
    • Sprint:
      OpenIDM Sprint 44

      Description

      We recently re-discussed how to mock static method invocation. This topic comes up over and over. Where possible, we should promote classes to services and use OSGi @Reference to inject the dependency. Then, unit tests can mock them and provide the mock using the appropriate bind method.

      JSONEnhancedConfig.newInstance() called from nearly every activate method is once such annoyance that makes unit testing difficult.

        Attachments

          Activity

            People

            • Assignee:
              brmiller Brendan Miller
              Reporter:
              brmiller Brendan Miller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: