forked from TNG/ArchUnitNET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArchRuleExtensions.cs
35 lines (32 loc) · 1.26 KB
/
ArchRuleExtensions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2019 Florian Gather <[email protected]>
// Copyright 2019 Paula Ruiz <[email protected]>
// Copyright 2019 Fritz Brandhuber <[email protected]>
//
// SPDX-License-Identifier: Apache-2.0
using ArchUnitNET.Domain;
using ArchUnitNET.Fluent;
// ReSharper disable once CheckNamespace
namespace Xunit
{
public static class ArchRuleExtensions
{
/// <summary>
/// Verifies that the architecture meets the criteria of the archrule.
/// </summary>
/// <param name="archRule">The rule to test the architecture with</param>
/// <param name="architecture">The architecture to be tested</param>
public static void Check(this IArchRule archRule, Architecture architecture)
{
Assert.ArchRule(architecture, archRule);
}
/// <summary>
/// Verifies that the architecture meets the criteria of the archrule.
/// </summary>
/// <param name="architecture">The architecture to be tested</param>
/// <param name="archRule">The rule to test the architecture with</param>
public static void CheckRule(this Architecture architecture, IArchRule archRule)
{
Assert.ArchRule(architecture, archRule);
}
}
}