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

MockResource Properties

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Commons Testing 2.0.10
    • Fix Version/s: None
    • Component/s: Testing
    • Labels:

      Description

      A useful feature for the MockResource testing class would be the ability to specify additional properties and return them when the MockResource is adapted into a ValueMap.

      I use this on nearly every project I've been on to test services. I've attached a patch file which adds two methods:
      addProperty - add a single key, value set
      getProperties - returns the map of properties which can be modified

      And then in the adaptTo method I just added all of the properties in the map into the returned ValueMap.

        Attachments

          Activity

            People

            • Assignee:
              bdelacretaz Bertrand Delacretaz
              Reporter:
              klcodanr Dan Klco
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: