Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59617

Create unit test for IconLabelProvider

    Details

    • Similar Issues:
    • Released As:
      8.0.0

      Attachments

        Activity

        Hide
        xiongkezhi Kezhi Xiong added a comment -

        When I'm writing the test, I have to access the private field ICONS_URL. So I can only access it by adding a getter (maybe comment it only used for test) or use reflection. I have no idea which style our test code should follow, or should we not access it at all?

        Show
        xiongkezhi Kezhi Xiong added a comment - When I'm writing the test, I have to access the private field ICONS_URL. So I can only access it by adding a getter (maybe comment it only used for test) or use reflection. I have no idea which style our test code should follow, or should we not access it at all?
        Hide
        drulli Ulli Hafner added a comment -

        Just remove private, then the field is package private which is still ok. Then you can use it in the test as well.

        Show
        drulli Ulli Hafner added a comment - Just remove private , then the field is package private which is still ok. Then you can use it in the test as well.

          People

          • Assignee:
            xiongkezhi Kezhi Xiong
            Reporter:
            drulli Ulli Hafner
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: