Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-1621

Use exact type for objectUnderTest in groovy tests

XMLWordPrintable

      In the groovy tests in integration-test module, each test sets the object under test like this:

      def objectUnderTest
      
      def setup() { objectUnderTest = cpsAdminService } 

      Intelli-J is unable to determine the type of objectUnderTest. Thus features such as JavaDocs, suggestions, and error highlighting for incorrect arguments are disabled.

      Rather, the IDE says "No candidates found for method call objectUnderTest.createDataspace".

      By changing objectUnderTest to the exact type, the IDE knows the type and enables all features:

      CpsAdminService objectUnderTest
      
      def setup() { objectUnderTest = cpsAdminService } 

            danielhanrahan Daniel Hanrahan
            danielhanrahan Daniel Hanrahan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: