Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 301f413

Browse files
committed
chore: add references to architecture tests project
1 parent 79a084e commit 301f413

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/Domain/PlaceHolder.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Sample.Domain;
2+
3+
public class PlaceHolder
4+
{
5+
6+
}

tests/Architecture.Tests/Architecture.Tests.csproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,12 @@
2727
<Using Include="Xunit"/>
2828
</ItemGroup>
2929

30+
<ItemGroup>
31+
<ProjectReference Include="..\..\src\Api\Sample.Api.csproj" />
32+
<ProjectReference Include="..\..\src\Application\Sample.Application.csproj" />
33+
<ProjectReference Include="..\..\src\Domain\Sample.Domain.csproj" />
34+
<ProjectReference Include="..\..\src\Front\Sample.Front.csproj" />
35+
<ProjectReference Include="..\..\src\Infrastructure\Sample.Infrastructure.csproj" />
36+
</ItemGroup>
37+
3038
</Project>

tests/Architecture.Tests/ProjectReferenceTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ public class ProjectReferenceTests
77
[Fact]
88
public void Domain_Should_Not_HaveDependencyOnOtherProjects()
99
{
10-
var assembly = typeof(Sample.Domain.AssemblyReference).Assembly;
10+
var domainAssembly = typeof(Sample.Domain.PlaceHolder).Assembly;
1111

12-
var result = Types.InAssembly(assembly)
12+
var result = Types.InAssembly(domainAssembly)
1313
.Should()
1414
.NotHaveDependencyOn("Sample.Application")
1515
.And()

0 commit comments

Comments
 (0)