Skip to content

Commit cffcda9

Browse files
committed
Update namespace regex patterns in architecture tests
Replaced ($|\..*) with ($|\.*) in .ResideInNamespaceMatching() for Repository, Service, and Controller checks. This change modifies which namespaces are considered valid for these types in the architecture tests.
1 parent c8d418a commit cffcda9

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

source/AAS.TwinEngine.DataEngine.UnitTests/CleanArchitectureTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void RepositoryInterfacesShallBeInCorrectNamespace()
9393
.And()
9494
.DoNotHaveFullName($"{BaseNamespace}.Infrastructure.DataAccess.GenericRepository.IMongoDbRepository")
9595
.Should()
96-
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic($|\\..*).")
96+
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic($|\\.*)")
9797
.WithoutRequiringPositiveResults()
9898
.Check(_architecture);
9999
}
@@ -102,7 +102,7 @@ public void RepositoryInterfacesShallBeInCorrectNamespace()
102102
public void ServicesShallBeInCorrectNamespace()
103103
{
104104
Classes().That().HaveNameEndingWith("Service").Should()
105-
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic\\.Services($|\\..*).")
105+
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic\\.Services($|\\.*)")
106106
.Check(_architecture);
107107
}
108108

@@ -111,15 +111,15 @@ public void ServiceInterfacesShallBeInCorrectNamespace()
111111
{
112112
Interfaces().That().HaveNameEndingWith("Service")
113113
.Should()
114-
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic\\.Services($|\\..*).")
114+
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic\\.Services($|\\.*)")
115115
.Check(_architecture);
116116
}
117117

118118
[Fact]
119119
public void ControllerShallBeInCorrectNamespace()
120120
{
121121
Classes().That().HaveNameEndingWith("Controller").Should()
122-
.ResideInNamespaceMatching($"{BaseNamespace}\\.Api($|\\..*).")
122+
.ResideInNamespaceMatching($"{BaseNamespace}\\.Api($|\\.*)")
123123
.Check(_architecture);
124124
}
125125
}

source/AAS.TwinEngine.Plugin.TestPlugin.UnitTests/CleanArchitectureTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void RepositoryInterfacesShallBeInCorrectNamespace()
9393
.And()
9494
.DoNotHaveFullName($"{BaseNamespace}.Infrastructure.DataAccess.GenericRepository.IMongoDbRepository")
9595
.Should()
96-
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic($|\\..*).")
96+
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic($|\\.*)")
9797
.WithoutRequiringPositiveResults()
9898
.Check(_architecture);
9999
}
@@ -102,7 +102,7 @@ public void RepositoryInterfacesShallBeInCorrectNamespace()
102102
public void ServicesShallBeInCorrectNamespace()
103103
{
104104
Classes().That().HaveNameEndingWith("Service").Should()
105-
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic\\.Services($|\\..*).")
105+
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic\\.Services($|\\.*)")
106106
.Check(_architecture);
107107
}
108108

@@ -111,15 +111,15 @@ public void ServiceInterfacesShallBeInCorrectNamespace()
111111
{
112112
Interfaces().That().HaveNameEndingWith("Service")
113113
.Should()
114-
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic\\.Services($|\\..*).")
114+
.ResideInNamespaceMatching($"{BaseNamespace}\\.ApplicationLogic\\.Services($|\\.*)")
115115
.Check(_architecture);
116116
}
117117

118118
[Fact]
119119
public void ControllerShallBeInCorrectNamespace()
120120
{
121121
Classes().That().HaveNameEndingWith("Controller").Should()
122-
.ResideInNamespaceMatching($"{BaseNamespace}\\.Api($|\\..*).")
122+
.ResideInNamespaceMatching($"{BaseNamespace}\\.Api($|\\.*)")
123123
.Check(_architecture);
124124
}
125125
}

0 commit comments

Comments
 (0)