File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Orm/Xtensive.Orm.Tests.Core/Collections Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -172,8 +172,14 @@ public void ToArrayCountTest()
172
172
Assert . That ( array . Length , Is . EqualTo ( 10 ) ) ;
173
173
Assert . That ( array . All ( x => x == 1 ) ) ;
174
174
175
- _ = Assert . Throws < ArgumentOutOfRangeException > ( ( ) => Enumerable . Repeat ( 1 , 10 ) . ToArray ( 11 ) ) ;
176
- _ = Assert . Throws < ArgumentOutOfRangeException > ( ( ) => Enumerable . Repeat ( 1 , 10 ) . ToArray ( 9 ) ) ;
175
+ array = Enumerable . Repeat ( 1 , 10 ) . ToArray ( 11 ) ;
176
+ Assert . That ( array . Length , Is . EqualTo ( 11 ) ) ;
177
+ Assert . That ( array . Take ( 10 ) . All ( x => x == 1 ) ) ;
178
+ Assert . That ( array [ 10 ] , Is . Not . EqualTo ( 1 ) ) ;
179
+
180
+ array = Enumerable . Repeat ( 1 , 10 ) . ToArray ( 9 ) ;
181
+ Assert . That ( array . Length , Is . EqualTo ( 9 ) ) ;
182
+ Assert . That ( array . All ( x => x == 1 ) ) ;
177
183
}
178
184
179
185
[ Test ]
You can’t perform that action at this time.
0 commit comments