using ArchUnitNET.Domain;
using ArchUnitNET.Fluent;
// ReSharper disable once CheckNamespace
namespace ArchUnitNET.xUnitV3
{
public static class ArchRuleAssert
{
///
/// Verifies that the architecture meets the criteria of the archrule.
///
/// The architecture to be tested
/// The rule to test the architecture with
/// Thrown if the rule is violated
public static void CheckRule(Architecture architecture, IArchRule archRule)
{
if (!archRule.HasNoViolations(architecture))
{
throw new FailedArchRuleException(architecture, archRule);
}
}
}
}