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
644
644
645
645
// Verify
646
646
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 ) ;
649
649
Assert . AreEqual ( "B" , rows [ 2 ] . Name ) ;
650
650
651
651
// Setup
@@ -659,8 +659,8 @@ public void ShouldReturnProjectsSortedByCategoryIfCategoryColumnSpecifiedAsSortS
659
659
// Verify
660
660
Assert . AreEqual ( 3 , rows . Length ) ;
661
661
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 ) ;
664
664
665
665
VerifyAll ( ) ;
666
666
}
Original file line number Diff line number Diff line change 1
1
using System . Collections . Generic ;
2
+ using System . Linq ;
2
3
using ThoughtWorks . CruiseControl . Core . Reporting . Dashboard . Navigation ;
3
4
using ThoughtWorks . CruiseControl . Remote ;
4
5
using ThoughtWorks . CruiseControl . WebDashboard . Plugins . ProjectReport ;
@@ -31,9 +32,7 @@ public ProjectGridRow[] GenerateProjectGridRows(ProjectStatusOnServer[] statusLi
31
32
translations ) ) ;
32
33
}
33
34
34
- rows . Sort ( GetComparer ( sortColumn , sortIsAscending ) ) ;
35
-
36
- return rows . ToArray ( ) ;
35
+ return rows . OrderBy ( a => a , GetComparer ( sortColumn , sortIsAscending ) ) . ToArray ( ) ;
37
36
}
38
37
39
38
private IComparer < ProjectGridRow > GetComparer ( ProjectGridSortColumn column , bool ascending )
You can’t perform that action at this time.
0 commit comments