-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathStaticTestArchitectures.cs
More file actions
92 lines (78 loc) · 3.77 KB
/
StaticTestArchitectures.cs
File metadata and controls
92 lines (78 loc) · 3.77 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using ArchUnitNET.Domain;
using ArchUnitNET.Loader;
using ArchUnitNET.xUnit;
using ArchUnitNETTests.Domain.Dependencies.Attributes;
using ArchUnitNETTests.Domain.Dependencies.Members;
using TestAssembly;
// ReSharper disable InconsistentNaming
namespace ArchUnitNETTests
{
public static class StaticTestArchitectures
{
public static readonly Architecture AttributeDependencyTestArchitecture = new ArchLoader()
.LoadAssemblies(typeof(ClassWithExampleAttribute).Assembly, typeof(Class1).Assembly)
.Build();
public static readonly Architecture ArchUnitNETTestArchitecture = new ArchLoader()
.LoadAssemblies(typeof(BaseClass).Assembly)
.Build();
public static readonly Architecture AttributeArchitecture = new ArchLoader()
.WithoutRuleEvaluationCache()
.WithoutArchitectureCache()
.LoadAssemblies(typeof(AttributeNamespace.ClassWithoutAttributes).Assembly)
.Build();
public static readonly Architecture DependencyArchitecture = new ArchLoader()
.WithoutRuleEvaluationCache()
.WithoutArchitectureCache()
.LoadAssemblies(typeof(TypeDependencyNamespace.BaseClass).Assembly)
.Build();
public static readonly Architecture MethodDependencyArchitecture = new ArchLoader()
.WithoutRuleEvaluationCache()
.WithoutArchitectureCache()
.LoadAssemblies(typeof(MethodDependencyNamespace.MethodDependencyClass).Assembly)
.Build();
public static readonly Architecture InterfaceArchitecture = new ArchLoader()
.WithoutRuleEvaluationCache()
.WithoutArchitectureCache()
.LoadAssemblies(typeof(InterfaceAssembly.IBaseInterface).Assembly)
.Build();
public static readonly Architecture LoaderTestArchitecture = new ArchLoader()
.WithoutRuleEvaluationCache()
.WithoutArchitectureCache()
.LoadAssemblies(
typeof(LoaderTestAssembly.LoaderTestAssembly).Assembly,
typeof(OtherLoaderTestAssembly.OtherLoaderTestAssembly).Assembly
)
.Build();
public static readonly Architecture VisibilityArchitecture = new ArchLoader()
.WithoutRuleEvaluationCache()
.WithoutArchitectureCache()
.LoadAssemblies(typeof(VisibilityNamespace.PublicClass).Assembly)
.Build();
public static readonly Architecture ArchUnitNETTestAssemblyArchitecture = new ArchLoader()
.LoadAssemblies(typeof(Class1).Assembly)
.Build();
public static readonly Architecture FullArchUnitNETArchitecture = new ArchLoader()
.LoadAssemblies(
typeof(Architecture).Assembly,
typeof(BaseClass).Assembly,
typeof(Class1).Assembly,
typeof(FailedArchRuleException).Assembly
)
.Build();
public static readonly Architecture ArchUnitNETTestArchitectureWithDependencies =
new ArchLoader()
.LoadAssembliesIncludingDependencies(typeof(BaseClass).Assembly)
.Build();
public static readonly Architecture ArchUnitNETTestAssemblyArchitectureWithDependencies =
new ArchLoader().LoadAssembliesIncludingDependencies(typeof(Class1).Assembly).Build();
public static readonly Architecture FullArchUnitNETArchitectureWithDependencies =
new ArchLoader()
.LoadAssembliesIncludingDependencies(
typeof(Architecture).Assembly,
typeof(BaseClass).Assembly,
typeof(Class1).Assembly,
typeof(FailedArchRuleException).Assembly
)
.Build();
}
}