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

Remove test API from JavaScript wrappers

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Scripting JavaScript 2.0.12
    • Scripting
    • None

    Description

      SLING-383 introduced an abstract method jsGet_javascriptWrapperClass() in the ScriptableBase class. This method is used by unit tests to verify the JavaScript host object is provided by the correct implementation class.

      This test is problematic on different accounts:

      • It creates public API exposing implementation details (the javascriptWrapperClass property)
      • It creates an implementation detail dependency in the tests. The tests must validate the functionality not whether the provider is the right instance. For example if the classes would be moved to another package, the tests would fail.

      Attachments

        Activity

          People

            fmeschbe Felix Meschberger
            fmeschbe Felix Meschberger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: