-
Notifications
You must be signed in to change notification settings - Fork 542
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
[SUREFIRE-1615] Sort <testcase> in the surefire-report/Test-*.xml file #208
base: master
Are you sure you want to change the base?
Conversation
Sort methodRunHistoryMap
@lanlingxueyu |
ok,already edited |
//map.entrySet() Convert into list | ||
List<Map.Entry<String, List<WrappedReportEntry>>> methodRunHistoryMapCoIntoList = | ||
new ArrayList<Map.Entry<String, List<WrappedReportEntry>>>( methodRunHistoryMap.entrySet() ); | ||
//sort |
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.
pls do not use comments.
Can you use static import instead of this long line Collections.sort
? And import Map.Entry
as well. Then pls do not rephrase reference type in local variable name methodRunHistoryMapCoIntoList
and use plural of methodReportEntries
.
Can you please extract this part into possibly a private static method and write a unit test just for that? You should call private method with PowerMock using org.powermock.reflect.Whitebox;
. As a hint see our unit tests in Surefire.
|
||
//map.entrySet() Convert into list | ||
List<Map.Entry<String, List<WrappedReportEntry>>> methodRunHistoryMapCoIntoList = | ||
new ArrayList<Map.Entry<String, List<WrappedReportEntry>>>( methodRunHistoryMap.entrySet() ); |
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.
In Java 1.7 the constructor should use diamond instead of Generics.
@lanlingxueyu |
Sort methodRunHistoryMap
Eliminate the *Test.xml report tag out of order,
Resolve differences in rebuilding *Test.xml files