Repository navigation
Expand file tree
/
Copy pathNestedTypesTests.cs
More file actions
66 lines (62 loc) · 1.78 KB
/
Copy pathNestedTypesTests.cs
File metadata and controls
66 lines (62 loc) · 1.78 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
using ArchUnitNET.Domain;
using ArchUnitNET.Loader;
using ArchUnitNET.xUnit;
using Xunit;
using static ArchUnitNET.Fluent.ArchRuleDefinition;
namespace ArchUnitNETTests.Loader
{
public class NestedTypesTests
{
private static readonly Architecture Architecture = new ArchLoader()
.LoadAssemblies(System.Reflection.Assembly.Load("ArchUnitNETTests"))
.Build();
[Fact]
public void FindAllNestedTypes()
{
Types()
.That()
.Are(typeof(Layer1Class.Layer2Class))
.Should()
.Exist()
.Check(Architecture);
Types()
.That()
.Are(typeof(Layer1Class.Layer2Class.Layer3Class1))
.Should()
.Exist()
.Check(Architecture);
Types()
.That()
.Are(typeof(Layer1Class.Layer2Class.Layer3Class1.Layer4Class1))
.Should()
.Exist()
.Check(Architecture);
Types()
.That()
.Are(typeof(Layer1Class.Layer2Class.Layer3Class2))
.Should()
.Exist()
.Check(Architecture);
Types()
.That()
.Are(typeof(Layer1Class.Layer2Class.Layer3Class2.Layer4Class2))
.Should()
.Exist()
.Check(Architecture);
}
}
public class Layer1Class
{
public class Layer2Class
{
public class Layer3Class1
{
public class Layer4Class1 { }
}
public class Layer3Class2
{
public class Layer4Class2 { }
}
}
}
}