@@ -47,6 +47,7 @@ public void CanExecuteCountWithOrderByArguments()
4747 public void CanSelectPropertiesIntoObjectArray ( )
4848 {
4949 var result = db . Users
50+ . OrderBy ( u => u . Id )
5051 . Select ( u => new object [ ] { u . Id , u . Name , u . InvalidLoginAttempts } )
5152 . First ( ) ;
5253
@@ -59,6 +60,7 @@ public void CanSelectPropertiesIntoObjectArray()
5960 public void CanSelectComponentsIntoObjectArray ( )
6061 {
6162 var result = db . Users
63+ . OrderBy ( u => u . Id )
6264 . Select ( u => new object [ ] { u . Component , u . Component . OtherComponent } )
6365 . First ( ) ;
6466
@@ -94,6 +96,7 @@ public void CanSelectConstantsIntoObjectArray()
9496 const string name = "Julian" ;
9597
9698 var result = db . Users
99+ . OrderBy ( u => u . Id )
97100 . Select ( u => new object [ ] { u . Id , pi , name , DateTime . MinValue } )
98101 . First ( ) ;
99102
@@ -107,6 +110,7 @@ public void CanSelectConstantsIntoObjectArray()
107110 public void CanSelectPropertiesFromAssociationsIntoObjectArray ( )
108111 {
109112 var result = db . Users
113+ . OrderBy ( u => u . Id )
110114 . Select ( u => new object [ ] { u . Id , u . Role . Name , u . Role . Entity . Output } )
111115 . First ( ) ;
112116
@@ -119,6 +123,7 @@ public void CanSelectPropertiesFromAssociationsIntoObjectArray()
119123 public void CanSelectPropertiesIntoObjectArrayInProperty ( )
120124 {
121125 var result = db . Users
126+ . OrderBy ( u => u . Id )
122127 . Select ( u => new { Cells = new object [ ] { u . Id , u . Name , new object [ u . Id ] } } )
123128 . First ( ) ;
124129
@@ -132,6 +137,7 @@ public void CanSelectPropertiesIntoObjectArrayInProperty()
132137 public void CanSelectPropertiesIntoPropertyListInProperty ( )
133138 {
134139 var result = db . Users
140+ . OrderBy ( u => u . Id )
135141 . Select ( u => new { Cells = new List < object > { u . Id , u . Name , new object [ u . Id ] } } )
136142 . First ( ) ;
137143
@@ -144,7 +150,7 @@ public void CanSelectPropertiesIntoPropertyListInProperty()
144150 [ Test , Description ( "NH-2744" ) ]
145151 public void CanSelectPropertiesIntoNestedObjectArrays ( )
146152 {
147- var query = db . Users . Select ( u => new object [ ] { "Root" , new object [ ] { "Sub1" , u . Name , new object [ ] { "Sub2" , u . Name } } } ) ;
153+ var query = db . Users . OrderBy ( u => u . Id ) . Select ( u => new object [ ] { "Root" , new object [ ] { "Sub1" , u . Name , new object [ ] { "Sub2" , u . Name } } } ) ;
148154 var result = query . First ( ) ;
149155
150156 Assert . That ( result . Length , Is . EqualTo ( 2 ) ) ;
0 commit comments