[SUREFIRE-1615] Sort <testcase> in the surefire-report/Test-*.xml file#208
[SUREFIRE-1615] Sort <testcase> in the surefire-report/Test-*.xml file#208lanlingxueyu wants to merge 1 commit intoapache:masterfrom
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.
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.
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