8000 Minor refactoring so that the CI can display the messages · GiTechLab/libgit2sharp@ade0998 · GitHub
[go: up one dir, main page]

Skip to content

Commit ade0998

Browse files
committed
Minor refactoring so that the CI can display the messages
1 parent 0865148 commit ade0998

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

LibGit2Sharp.Tests/MetaFixture.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)
0