using System.Collections.Generic; using ArchUnitNET.Domain; using ArchUnitNET.Fluent; using ArchUnitNET.Fluent.Extensions; using TUnit.Assertions.Exceptions; // ReSharper disable once CheckNamespace namespace ArchUnitNET.TUnit { public class FailedArchRuleException : BaseAssertionException { /// /// Creates a new instance of the class. /// /// The architecture which was tested /// The archrule that failed public FailedArchRuleException(Architecture architecture, IArchRule archRule) : this(archRule.Evaluate(architecture)) { } /// /// Creates a new instance of the class. /// /// The results of the evaluation of the archrule public FailedArchRuleException(IEnumerable evaluationResults) : base(evaluationResults.ToErrorMessage()) { } } }