-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JENKINS-69757 Improve priority sorter plugin automated test coverage #259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request. There is one minor item that needs to be adjusted and then it is ready to merge.
In future pull requests, please create a new branch that contains your changes rather than placing your changes on a branch named master
. When your branch is named master
it complicates the review process for maintainers like me.
You can read more about creating a pull request in the "Improve a plugin" tutorial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
JENKINS-69757
This pull request introduces new tests for the PrioritySorterConfiguration class, specifically targeting the doFillStrategyItems method.
The doFillStrategyItems method is responsible for populating a ListBoxModel with the display names and keys of all sorter strategies. The test, testDoFillStrategyItems, ensures that this List BoxModel is correctly populated.

The test leverages Mockito to mock the SorterStrategyDescriptor instances and their respective methods, getDisplayName and getKey. It verifies that the ListBoxModel returned by doFillStrategyItems contains the correct number of items and that each item's name and value match the expected values.