[JIRA] (JENKINS-59617) Create unit test for IconLabelProvider

10 views
Skip to first unread message

ullrich.hafner@gmail.com (JIRA)

unread,
Oct 1, 2019, 4:25:02 PM10/1/19
to jenkinsc...@googlegroups.com
Ulli Hafner created an issue
 
Jenkins / Task JENKINS-59617
Create unit test for IconLabelProvider
Issue Type: Task Task
Assignee: Unassigned
Components: warnings-ng-plugin
Created: 2019-10-01 20:24
Labels: newbie-friendly help-wanted
Priority: Trivial Trivial
Reporter: Ulli Hafner
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

august.xkz@gmail.com (JIRA)

unread,
Feb 15, 2020, 9:08:02 AM2/15/20
to jenkinsc...@googlegroups.com
Kezhi Xiong assigned an issue to Kezhi Xiong
Change By: Kezhi Xiong
Assignee: Kezhi Xiong

august.xkz@gmail.com (JIRA)

unread,
Feb 15, 2020, 11:46:03 AM2/15/20
to jenkinsc...@googlegroups.com
Kezhi Xiong commented on Task JENKINS-59617
 
Re: Create unit test for IconLabelProvider

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?

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 16, 2020, 1:34:03 PM2/16/20
to jenkinsc...@googlegroups.com

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

ullrich.hafner@gmail.com (JIRA)

unread,
Feb 17, 2020, 3:49:03 AM2/17/20
to jenkinsc...@googlegroups.com
Change By: Ulli Hafner
Status: Open Fixed but Unreleased
Resolution: Fixed

ullrich.hafner@gmail.com (JIRA)

unread,
Mar 2, 2020, 1:19:07 PM3/2/20
to jenkinsc...@googlegroups.com
Change By: Ulli Hafner
Status: Fixed but Unreleased Resolved
Released As: 8.0.0
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages