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

Create unit test for IconLabelProvider

    XMLWordPrintable

Details

    • 8.0.0

    Attachments

      Activity

        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?

        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?
        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.

        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

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

          Dates

            Created:
            Updated:
            Resolved: