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()
254254 ( ! m . IsVirtual || m . IsFinal ) )
255255 . ToList ( ) ;
256256
257- foreach ( var method in nonVirtualGetEnumeratorMethods )
257+ if ( nonVirtualGetEnumeratorMethods . Any ( ) )
258258 {
259- Debug . WriteLine ( String . Format ( "GetEnumerator in type '{0}' isn't virtual." , method . DeclaringType ) ) ;
260- }
259+ var sb = new StringBuilder ( ) ;
261260
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+ }
263269 }
264270 }
265271}
You can’t perform that action at this time.
0 commit comments