@@ -58,7 +58,7 @@ public void TransposeWithRowsOfSameLength()
58
58
using var row3 = TestingSequence . Of ( 30 , 31 , 32 , 33 ) ;
59
59
using var matrix = TestingSequence . Of ( row1 , row2 , row3 ) ;
60
60
61
- AssertMatrix ( expectations , matrix . Transpose ( ) ) ;
61
+ Assert . That ( matrix . Transpose ( ) , Is . EqualTo ( expectations ) ) ;
62
62
}
63
63
64
64
[ Test ]
@@ -77,7 +77,7 @@ public void TransposeWithRowsOfDifferentLengths()
77
77
using var row4 = TestingSequence . Of ( 30 , 31 , 32 ) ;
78
78
using var matrix = TestingSequence . Of ( row1 , row2 , row3 , row4 ) ;
79
79
80
- AssertMatrix ( expectations , matrix . Transpose ( ) ) ;
80
+ Assert . That ( matrix . Transpose ( ) , Is . EqualTo ( expectations ) ) ;
81
81
}
82
82
83
83
[ Test ]
@@ -116,7 +116,7 @@ public void TransposeWithAllRowsAsInfiniteSequences()
116
116
[ 32 , 243 , 3125 ]
117
117
} ;
118
118
119
- AssertMatrix ( expectations , result ) ;
119
+ Assert . That ( result , Is . EqualTo ( expectations ) ) ;
120
120
}
121
121
122
122
[ Test ]
@@ -139,7 +139,7 @@ public void TransposeWithSomeRowsAsInfiniteSequences()
139
139
[ 32 , 3125 ]
140
140
} ;
141
141
142
- AssertMatrix ( expectations , result ) ;
142
+ Assert . That ( result , Is . EqualTo ( expectations ) ) ;
143
143
}
144
144
145
145
[ Test ]
@@ -207,18 +207,5 @@ static bool IsPrime(int number)
207
207
208
208
return true ;
209
209
}
210
-
211
- static void AssertMatrix < T > ( IEnumerable < IEnumerable < T > > expectation , IEnumerable < IEnumerable < T > > result )
212
- {
213
- // necessary because NUnitLite 3.6.1 (.NET 4.5) for Mono don't assert nested enumerables
214
-
215
- var resultList = result . ToList ( ) ;
216
- var expectationList = expectation . ToList ( ) ;
217
-
218
- Assert . That ( resultList . Count , Is . EqualTo ( expectationList . Count ) ) ;
219
-
220
- expectationList . Zip ( resultList , ValueTuple . Create )
221
- . ForEach ( t => t . Item1 . AssertSequenceEqual ( t . Item2 ) ) ;
222
- }
223
210
}
224
211
}
0 commit comments