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

Sling Mocks: Add easy way to inject SlingBindings into MockSlingHttpServletRequest

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Testing Sling Mock 2.5.0
    • Testing Sling Mock 2.7.0
    • Testing
    • None

    Description

      As SlingBindings are often crucial when dealing with Sling Models there should be an easy way to set them for a mocked request (https://sling.apache.org/documentation/development/sling-mock.html#slinghttpservletrequest)

      A dedicated method which automatically fills the SlingBindings with the mandatory stuff and another one to add additional bindings would be very helpful.
      Also injecting values from all registered BindingsValuesProvider with a specific context would be useful.

      Attachments

        Activity

          People

            sseifert Stefan Seifert
            kwin Konrad Windszus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m