Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// SPDX-License-Identifier: Apache-2.0

namespace ArchUnitNET.Fluent
namespace ArchUnitNET.Domain
{
public interface IHasDescription
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
// SPDX-License-Identifier: Apache-2.0

using System.Collections.Generic;
using ArchUnitNET.Domain;

namespace ArchUnitNET.Fluent
namespace ArchUnitNET.Domain
{
public interface IObjectProvider<out T> : IHasDescription where T : ICanBeAnalyzed
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@

using System.Collections.Generic;
using System.Linq;
using ArchUnitNET.Domain;

namespace ArchUnitNET.Loader
namespace ArchUnitNET.Domain
{
public class MethodMemberInstance : ITypeInstance<IType>
{
Expand Down
2 changes: 2 additions & 0 deletions ArchUnitNET/Fluent/Extensions/SyntaxElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
//
// SPDX-License-Identifier: Apache-2.0

using ArchUnitNET.Domain;

namespace ArchUnitNET.Fluent.Extensions
{
public static class SyntaxElementExtensions
Expand Down
1 change: 1 addition & 0 deletions ArchUnitNET/Fluent/LogicalConjunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

using System;
using System.Collections.Generic;
using ArchUnitNET.Domain;

namespace ArchUnitNET.Fluent
{
Expand Down
1 change: 1 addition & 0 deletions ArchUnitNET/Fluent/Slices/SliceIdentifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0
//

using ArchUnitNET.Domain;
using ArchUnitNET.Fluent.Freeze;

namespace ArchUnitNET.Fluent.Slices
Expand Down
21 changes: 18 additions & 3 deletions ArchUnitNETTests/ArchitectureTests/ArchUnitArchitectureTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

using ArchUnitNET.Domain;
using ArchUnitNET.Fluent;
using ArchUnitNET.Fluent.Slices;
using ArchUnitNET.Loader;
using ArchUnitNET.xUnit;
using Xunit;
Expand All @@ -23,11 +24,19 @@ public class ArchUnitArchitectureTests
private readonly Architecture _architecture =
new ArchLoader().LoadAssembly(typeof(Architecture).Assembly).Build();

[Fact(Skip = "Need more refactoring")]
public void DomainHasNoDependencyOnFluentAndLoader()
[Fact]
public void DomainHasNoDependencyOnFluent()
{
Types().That().ResideInNamespace(DomainNamespace)
.Should().NotDependOnAny(new[] {LoaderNamespace, FluentNamespace})
.Should().NotDependOnAny(FluentNamespace)
.Check(_architecture);
}

[Fact]
public void DomainHasNoDependencyOnLoader()
{
Types().That().ResideInNamespace(DomainNamespace)
.Should().NotDependOnAny(LoaderNamespace)
.Check(_architecture);
}

Expand All @@ -46,5 +55,11 @@ public void FluentHasNoDependencyOnLoader()
.Should().NotDependOnAny(LoaderNamespace)
.Check(_architecture);
}

[Fact]
public void NoCircularDependencies()
{
SliceRuleDefinition.Slices().Matching("ArchUnitNET.(*)").Should().BeFreeOfCycles().Check(_architecture);
}
}
}