• 8.0.0

        [JENKINS-59617] Create unit test for IconLabelProvider

        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?

        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?

        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.

        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.

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

            Created:
            Updated:
            Resolved: