File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -254,12 +254,18 @@ public void GetEnumeratorMethodsInLibGit2SharpMustBeVirtualForTestability()
254
254
( ! m . IsVirtual || m . IsFinal ) )
255
255
. ToList ( ) ;
256
256
257
- foreach ( var method in nonVirtualGetEnumeratorMethods )
257
+ if ( nonVirtualGetEnumeratorMethods . Any ( ) )
258
258
{
259
- Debug . WriteLine ( String . Format ( "GetEnumerator in type '{0}' isn't virtual." , method . DeclaringType ) ) ;
260
- }
259
+ var sb = new StringBuilder ( ) ;
261
260
262
- Assert . Empty ( nonVirtualGetEnumeratorMethods ) ;
261
+ foreach ( var method in nonVirtualGetEnumeratorMethods )
262
+ {
263
+ sb . AppendFormat ( "GetEnumerator in type '{0}' isn't virtual.{1}" ,
264
+ method . DeclaringType , Environment . NewLine ) ;
265
+ }
266
+
267
+ Assert . True ( false , Environment . NewLine + sb . ToString ( ) ) ;
268
+ }
263
269
}
264
270
}
265
271
}
You can’t perform that action at this time.
0 commit comments