mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-02 21:43:08 +00:00
27 lines
788 B
C#
27 lines
788 B
C#
using Core;
|
|
using NUnit.Framework;
|
|
|
|
namespace DistTestCore
|
|
{
|
|
public static class DownloadedLogExtensions
|
|
{
|
|
public static void AssertLogContains(this IDownloadedLog log, string expectedString)
|
|
{
|
|
Assert.That(log.DoesLogContain(expectedString), $"Did not find '{expectedString}' in log.");
|
|
}
|
|
|
|
public static void AssertLogDoesNotContain(this IDownloadedLog log, params string[] unexpectedStrings)
|
|
{
|
|
var errors = new List<string>();
|
|
foreach (var str in unexpectedStrings)
|
|
{
|
|
if (log.DoesLogContain(str))
|
|
{
|
|
errors.Add($"Did find '{str}' in log.");
|
|
}
|
|
}
|
|
CollectionAssert.IsEmpty(errors);
|
|
}
|
|
}
|
|
}
|