Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1195

Make AdapterManager implementation somehow accessible for junit tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adapter 2.0.4
    • Adapter 2.0.6
    • Extensions
    • None

    Description

      The SlingAdaptable directly uses the internal AdapterManagerImpl class to get adapter factories. This works fine in an OSGi context.
      Using a SlingAdaptable within a junit test is harder, especially if one wants to use an adapter factory. This requires manual instantiation of the adaptermanager impl and some reflection tricks etc. to get the factory registered.
      We should find a better way which makes writing junit tests easier.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            cziegeler Carsten Ziegeler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: