Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NeVeSpl committed May 13, 2023
1 parent 8162772 commit b84c1db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/NetArchTest.Rules/NetArchTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Version>1.3.4</Version>
<Authors>NeVeSpl</Authors>
<Product>NetArchTest.eNhancedEdition </Product>
<Description>A fluent API for .Net Standard that can enforce architectural rules in unit tests.</Description>
<Description>A fluent API for .Net Standard that can enforce architectural rules in unit tests. Improved version, built upon NetArchTest.Rules v1.3.2.</Description>
<Copyright>(c) NetArchTest.eNhancedEdition</Copyright>
<PackageLicense>https://github.com/NeVeSpl/NetArchTest.eNhancedEdition/blob/master/LICENSE</PackageLicense>
<PackageProjectUrl>https://github.com/NeVeSpl/NetArchTest.eNhancedEdition</PackageProjectUrl>
Expand Down
5 changes: 3 additions & 2 deletions src/NetArchTest.Rules/TestResult.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using NetArchTest.Assemblies;
Expand Down Expand Up @@ -27,7 +28,7 @@ private TestResult()
/// <remarks>
/// This method loads all the types and may throw dependency loading errors if the test project does not have a direct dependency on the type being loaded.
/// </remarks>
public IReadOnlyList<IType> FailingTypes { get; private set; }
public IReadOnlyList<IType> FailingTypes { get; private set; } = Array.Empty<IType>();


/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions test/NetArchTest.Rules.UnitTests/ConditionListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ public void GetResult_FailedShouldNot_ReturnFailedTypes()
Assert.Contains<Type>(typeof(ClassA3), result.FailingTypes.Select(x => x.ReflectionType));
}

[Fact(DisplayName = "If a condition succeeds then a list of failing types should be null.")]
public void GetResult_Success_ReturnNullFailedTypes()
[Fact(DisplayName = "If a condition succeeds then a list of failing types should be empty.")]
public void GetResult_Success_ReturnEmptyFailedTypes()
{
var result = Types
.InAssembly(Assembly.GetAssembly(typeof(ClassA1)))
Expand All @@ -162,7 +162,7 @@ public void GetResult_Success_ReturnNullFailedTypes()
.GetResult();

Assert.True(result.IsSuccessful);
Assert.Null(result.FailingTypes);
Assert.Empty(result.FailingTypes);
}
}
}

0 comments on commit b84c1db

Please sign in to comment.