This repository was archived by the owner on Feb 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
UnitTests/WebDashboard/Dashboard Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -644,8 +644,8 @@ public void ShouldReturnProjectsSortedByCategoryIfCategoryColumnSpecifiedAsSortS
644644
645645 // Verify
646646 Assert . AreEqual ( 3 , rows . Length ) ;
647- Assert . AreEqual ( "C " , rows [ 0 ] . Name ) ;
648- Assert . AreEqual ( "A " , rows [ 1 ] . Name ) ;
647+ Assert . AreEqual ( "A " , rows [ 0 ] . Name ) ;
648+ Assert . AreEqual ( "C " , rows [ 1 ] . Name ) ;
649649 Assert . AreEqual ( "B" , rows [ 2 ] . Name ) ;
650650
651651 // Setup
@@ -659,8 +659,8 @@ public void ShouldReturnProjectsSortedByCategoryIfCategoryColumnSpecifiedAsSortS
659659 // Verify
660660 Assert . AreEqual ( 3 , rows . Length ) ;
661661 Assert . AreEqual ( "B" , rows [ 0 ] . Name ) ;
662- Assert . AreEqual ( "C " , rows [ 1 ] . Name ) ;
663- Assert . AreEqual ( "A " , rows [ 2 ] . Name ) ;
662+ Assert . AreEqual ( "A " , rows [ 1 ] . Name ) ;
663+ Assert . AreEqual ( "C " , rows [ 2 ] . Name ) ;
664664
665665 VerifyAll ( ) ;
666666 }
Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
2+ using System . Linq ;
23using ThoughtWorks . CruiseControl . Core . Reporting . Dashboard . Navigation ;
34using ThoughtWorks . CruiseControl . Remote ;
45using ThoughtWorks . CruiseControl . WebDashboard . Plugins . ProjectReport ;
@@ -31,9 +32,7 @@ public ProjectGridRow[] GenerateProjectGridRows(ProjectStatusOnServer[] statusLi
3132 translations ) ) ;
3233 }
3334
34- rows . Sort ( GetComparer ( sortColumn , sortIsAscending ) ) ;
35-
36- return rows . ToArray ( ) ;
35+ return rows . OrderBy ( a => a , GetComparer ( sortColumn , sortIsAscending ) ) . ToArray ( ) ;
3736 }
3837
3938 private IComparer < ProjectGridRow > GetComparer ( ProjectGridSortColumn column , bool ascending )
You can’t perform that action at this time.
0 commit comments