2
0
mirror of synced 2025-01-11 00:56:05 +00:00
benbierens 01b2ff2181
Merge branch 'master' into plugin-refactor
# Conflicts:
#	DistTestCore/CodexStarter.cs
#	DistTestCore/GethStarter.cs
#	ProjectPlugins/CodexPlugin/CodexContainerRecipe.cs
#	ProjectPlugins/CodexPlugin/CodexSetup.cs
#	ProjectPlugins/CodexPlugin/CodexStartupConfig.cs
2023-09-21 11:07:27 +02:00

26 lines
622 B
C#

using NUnit.Framework.Constraints;
using NUnit.Framework;
using Utils;
namespace DistTestCore.Helpers
{
public static class AssertHelpers
{
public static void RetryAssert<T>(IResolveConstraint constraint, Func<T> actual, string message)
{
try
{
Time.WaitUntil(() => {
var c = constraint.Resolve();
return c.ApplyTo(actual()).IsSuccess;
});
}
catch (TimeoutException)
{
Assert.That(actual(), constraint, message);
}
}
}
}