Skip to content

Commit 1cfb7b2

Browse files
authored
Migrate from FluentAssertions to AwesomeAssertions (#1518)
* Migrate from FluentAssertions to AwesomeAssertions * BeLessOrEqualTo -> BeLessThanOrEqualTo
1 parent 6c0277a commit 1cfb7b2

File tree

112 files changed

+133
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+133
-128
lines changed

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<ItemGroup>
99
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
1010
<PackageVersion Include="Docker.DotNet" Version="3.125.15" />
11-
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
12-
<PackageVersion Include="FluentAssertions.Analyzers" Version="0.34.1" />
11+
<PackageVersion Include="AwesomeAssertions" Version="9.3.0" />
12+
<PackageVersion Include="AwesomeAssertions.Analyzers" Version="9.0.8" />
1313
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.10" />
1414
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.10" />
1515
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.10" />
@@ -55,4 +55,4 @@
5555
<!-- Fix security alerts -->
5656
<PackageVersion Include="System.Formats.Asn1" Version="9.0.10" />
5757
</ItemGroup>
58-
</Project>
58+
</Project>

test/.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,8 @@ dotnet_diagnostic.CA1062.severity = none
3838
# Justification: Test method names contain underscores
3939
# https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1707
4040
dotnet_diagnostic.CA1707.severity = none
41+
42+
# FAA0001: AwesomeAssertions analyzer suggestions
43+
# Justification: Suppress style suggestions that would be treated as errors
44+
# https://awesomeassertions.org/tips/
45+
dotnet_diagnostic.FAA0001.severity = none

test/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<PropertyGroup>
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
</PropertyGroup>
8-
8+
99
<ItemGroup Label="Package References">
1010
<PackageReference Include="MSTest.TestFramework"/>
1111
<PackageReference Include="MSTest.Analyzers "/>
1212
<PackageReference Include="Moq"/>
13-
<PackageReference Include="FluentAssertions"/>
13+
<PackageReference Include="AwesomeAssertions"/>
1414
<PackageReference Include="Faker.net"/>
1515
</ItemGroup>
1616

test/Microsoft.ComponentDetection.Common.Tests/AsyncExceptionTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace Microsoft.ComponentDetection.Common.Tests;
33
using System;
44
using System.Threading;
55
using System.Threading.Tasks;
6-
using FluentAssertions;
6+
using AwesomeAssertions;
77
using Microsoft.VisualStudio.TestTools.UnitTesting;
88

99
[TestClass]

test/Microsoft.ComponentDetection.Common.Tests/BaseDetectionTelemetryRecordTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Microsoft.ComponentDetection.Common.Tests;
66
using System.Net;
77
using System.Reflection;
88
using System.Runtime.Serialization;
9-
using FluentAssertions;
9+
using AwesomeAssertions;
1010
using Microsoft.ComponentDetection.Common.Telemetry.Records;
1111
using Microsoft.VisualStudio.TestTools.UnitTesting;
1212

@@ -41,7 +41,7 @@ public void UniqueRecordNames()
4141

4242
recordName.Should().NotBeNullOrEmpty($"RecordName not set for {type.FullName}!");
4343

44-
dic.Should().NotContainKey(recordName, "Duplicate RecordName:`{RecordName}` found for {TypeName}!", recordName, type.FullName);
44+
dic.Should().NotContainKey(recordName, $"Duplicate RecordName:{recordName} found for {type.FullName}!");
4545

4646
dic.Add(recordName, type);
4747
}

test/Microsoft.ComponentDetection.Common.Tests/CommandLineInvocationServiceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Microsoft.ComponentDetection.Common.Tests;
44
using System.IO;
55
using System.Text;
66
using System.Threading.Tasks;
7-
using FluentAssertions;
7+
using AwesomeAssertions;
88
using Microsoft.ComponentDetection.TestsUtilities;
99
using Microsoft.VisualStudio.TestTools.UnitTesting;
1010

test/Microsoft.ComponentDetection.Common.Tests/ComponentRecorderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace Microsoft.ComponentDetection.Common.Tests;
22

33
using System;
44
using System.Collections.Generic;
5-
using FluentAssertions;
5+
using AwesomeAssertions;
66
using Microsoft.ComponentDetection.Common.DependencyGraph;
77
using Microsoft.ComponentDetection.Contracts;
88
using Microsoft.ComponentDetection.Contracts.BcdeModels;

test/Microsoft.ComponentDetection.Common.Tests/ComponentStreamEnumerableTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace Microsoft.ComponentDetection.Common.Tests;
33
using System;
44
using System.IO;
55
using System.Linq;
6-
using FluentAssertions;
6+
using AwesomeAssertions;
77
using Microsoft.Extensions.Logging;
88
using Microsoft.VisualStudio.TestTools.UnitTesting;
99
using Moq;

test/Microsoft.ComponentDetection.Common.Tests/ConsoleWritingServiceTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace Microsoft.ComponentDetection.Common.Tests;
22

33
using System;
44
using System.IO;
5-
using FluentAssertions;
5+
using AwesomeAssertions;
66
using Microsoft.VisualStudio.TestTools.UnitTesting;
77

88
[TestClass]

test/Microsoft.ComponentDetection.Common.Tests/DependencyGraphTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace Microsoft.ComponentDetection.Common.Tests;
33
using System;
44
using System.Collections.Generic;
55
using System.Linq;
6-
using FluentAssertions;
6+
using AwesomeAssertions;
77
using Microsoft.ComponentDetection.Common.DependencyGraph;
88
using Microsoft.ComponentDetection.Contracts;
99
using Microsoft.ComponentDetection.Contracts.TypedComponent;

0 commit comments

Comments
 (0)