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

Provide helper class for simpler unit testing of sling code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Commons Testing 2.0.6
    • Testing
    • None

    Description

      When writing unit tests that do a bit of integration in Sling, you often need the following:

      • a JCR repository
      • registered node types
      • a JCR-based resource resolver
      • adapter managers (to support all the adaptTo methods in your code)

      This covers most of what has to be done to run unit tests for services without an OSGi container running. I have written such a helper class for our product and would like to contribute it to Sling, especially to write unit tests for SLING-1131. Patch will follow.

      Attachments

        1. SLING-1166.patch
          23 kB
          Alexander Klimetschek

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              alexander.klimetschek Alexander Klimetschek
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: