Skip to content

Commit b84c1db

Browse files
committed
1 parent 8162772 commit b84c1db

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/NetArchTest.Rules/NetArchTest.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Version>1.3.4</Version>
66
<Authors>NeVeSpl</Authors>
77
<Product>NetArchTest.eNhancedEdition </Product>
8-
<Description>A fluent API for .Net Standard that can enforce architectural rules in unit tests.</Description>
8+
<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>
99
<Copyright>(c) NetArchTest.eNhancedEdition</Copyright>
1010
<PackageLicense>https://github.com/NeVeSpl/NetArchTest.eNhancedEdition/blob/master/LICENSE</PackageLicense>
1111
<PackageProjectUrl>https://github.com/NeVeSpl/NetArchTest.eNhancedEdition</PackageProjectUrl>

src/NetArchTest.Rules/TestResult.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Diagnostics;
34
using System.Linq;
45
using NetArchTest.Assemblies;
@@ -27,7 +28,7 @@ private TestResult()
2728
/// <remarks>
2829
/// 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.
2930
/// </remarks>
30-
public IReadOnlyList<IType> FailingTypes { get; private set; }
31+
public IReadOnlyList<IType> FailingTypes { get; private set; } = Array.Empty<IType>();
3132

3233

3334
/// <summary>

test/NetArchTest.Rules.UnitTests/ConditionListTests.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ public void GetResult_FailedShouldNot_ReturnFailedTypes()
144144
Assert.Contains<Type>(typeof(ClassA3), result.FailingTypes.Select(x => x.ReflectionType));
145145
}
146146

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

164164
Assert.True(result.IsSuccessful);
165-
Assert.Null(result.FailingTypes);
165+
Assert.Empty(result.FailingTypes);
166166
}
167167
}
168168
}

0 commit comments

Comments
 (0)