From f7d4fb4743bc59196dd5fe747a60f81f36cb39c8 Mon Sep 17 00:00:00 2001 From: Dennis Doomen Date: Tue, 21 Jan 2025 17:47:46 +0100 Subject: [PATCH 01/36] Reconnected the new license to the history of the old license --- LICENSE.md => LICENSE | 0 README.md | 2 +- Src/FluentAssertions/FluentAssertions.csproj | 8 ++++---- docs/_pages/introduction.md | 2 +- docs/_pages/releases.md | 2 +- docs/index.html | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename LICENSE.md => LICENSE (100%) diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/README.md b/README.md index 0b0c3509a2..48a219198c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Extension methods to fluently assert the outcome of .NET tests Fluent Assertions provides a comprehensive set of extension methods that enable developers to express the expected outcomes of TDD (Test-Driven Development) and BDD (Behavior-Driven Development) unit tests in a natural, readable style. It is compatible with .NET Standard 2.0+, .NET Framework 4.7+, and .NET 6+. Versions 8 and beyond are free for open-source projects and non-commercial use, but commercial use requires [a paid license](https://xceed.com/products/unit-testing/fluent-assertions/). -Check out the [license page](LICENSE.md) for more information. Version 7 +Check out the [license page](LICENSE) for more information. Version 7 will remain fully open-source indefinitely and receive bugfixes and other important corrections. diff --git a/Src/FluentAssertions/FluentAssertions.csproj b/Src/FluentAssertions/FluentAssertions.csproj index 6b83035ca1..9a93a33d3f 100644 --- a/Src/FluentAssertions/FluentAssertions.csproj +++ b/Src/FluentAssertions/FluentAssertions.csproj @@ -21,14 +21,14 @@ BDD-style unit tests. Works with .NET Standard 2.0 and higher, .NET Framework 4.7 and higher and .NET 6 and higher. Supports the unit test frameworks MSTest2, NUnit3, NUnit4, XUnit2, XUnit3, MSpec and TUnit. - IMPORTANT: This version is free for open-source projects and non-commercial use, but commercial use requires [a paid license](https://xceed.com/products/unit-testing/fluent-assertions/). -Check out the [license page](LICENSE.md) for more information. + IMPORTANT: This version is free for open-source projects and non-commercial use, but commercial use requires [a paid license](https://xceed.com/products/unit-testing/fluent-assertions/). +Check out the [license page](LICENSE) for more information. https://xceed.com/products/unit-testing/fluent-assertions/ https://github.com/fluentassertions/fluentassertions git MSTest2;xUnit;NUnit;MSpec;TUnit;TDD;BDD;Fluent;netstandard;uwp - LICENSE.md + LICENSE FluentAssertions.png See https://fluentassertions.com/releases/ Copyright 2024-$([System.DateTime]::Now.ToString(yyyy)) Xceed Software Inc., all rights reserved @@ -42,7 +42,7 @@ Check out the [license page](LICENSE.md) for more information. - + diff --git a/docs/_pages/introduction.md b/docs/_pages/introduction.md index 23146830de..7f673f46fa 100644 --- a/docs/_pages/introduction.md +++ b/docs/_pages/introduction.md @@ -255,7 +255,7 @@ using (var innerScope = new AssertionScope()) Version 7 will remain fully open-source indefinitely and receive bugfixes and other important corrections. -Versions 8 and beyond are/will be free for open-source projects and non-commercial use, but commercial use requires a [paid license](https://xceed.com/products/unit-testing/fluent-assertions/). Check out the [license page](LICENSE.md) for more information. +Versions 8 and beyond are/will be free for open-source projects and non-commercial use, but commercial use requires a [paid license](https://xceed.com/products/unit-testing/fluent-assertions/). Check out the [license page](LICENSE) for more information. Since Fluent Assertions 8 doesn't need any license key, there's a soft warning that is displayed for every test run. This is to remind consumers that you need a paid license for commercial use. To suppress this warning, there's a static property called `License.Accepted` that can be set to `true`. You can add the following code to your test project to automatically toggle this flag. diff --git a/docs/_pages/releases.md b/docs/_pages/releases.md index 2de8ec3288..2a9a70d0c8 100644 --- a/docs/_pages/releases.md +++ b/docs/_pages/releases.md @@ -14,7 +14,7 @@ sidebar: ## 8.0.0 ### License Change -Versions 8 and beyond are/will be free for open-source projects and non-commercial use, but commercial use requires a [paid license](https://xceed.com/products/unit-testing/fluent-assertions/). Check out the [license page](LICENSE.md) for more information. +Versions 8 and beyond are/will be free for open-source projects and non-commercial use, but commercial use requires a [paid license](https://xceed.com/products/unit-testing/fluent-assertions/). Check out the [license page](LICENSE) for more information. Version 7 will remain fully open-source indefinitely and receive bugfixes and other important corrections. diff --git a/docs/index.html b/docs/index.html index a7491c777d..564a606211 100644 --- a/docs/index.html +++ b/docs/index.html @@ -33,7 +33,7 @@
Versions 8 and beyond are free for open-source projects and non-commercial use, but commercial use requires a [paid license](https://xceed.com/products/unit-testing/fluent-assertions/). - Check out the [license page](https://github.com/fluentassertions/fluentassertions/blob/main/LICENSE.md) for more information. Version 7 + Check out the [license page](https://github.com/fluentassertions/fluentassertions/blob/main/LICENSE) for more information. Version 7 will remain fully open-source indefinitely and receive bugfixes and other important corrections. ' feature_row: From 4760f3cdc8beb14c8852d1aa326b345eb813ca1e Mon Sep 17 00:00:00 2001 From: Dennis Doomen Date: Thu, 23 Jan 2025 08:02:52 +0100 Subject: [PATCH 02/36] Make sure developers don't accidentally update to v8 without understanding the new license. --- Src/FluentAssertions/FluentAssertions.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Src/FluentAssertions/FluentAssertions.csproj b/Src/FluentAssertions/FluentAssertions.csproj index 9a93a33d3f..4f27656ded 100644 --- a/Src/FluentAssertions/FluentAssertions.csproj +++ b/Src/FluentAssertions/FluentAssertions.csproj @@ -29,6 +29,7 @@ Check out the [license page](LICENSE) for more information. git MSTest2;xUnit;NUnit;MSpec;TUnit;TDD;BDD;Fluent;netstandard;uwp LICENSE + true FluentAssertions.png See https://fluentassertions.com/releases/ Copyright 2024-$([System.DateTime]::Now.ToString(yyyy)) Xceed Software Inc., all rights reserved From ae3290c3a3bec5e5127895db8ff6187e38a48af6 Mon Sep 17 00:00:00 2001 From: Dennis Doomen Date: Fri, 24 Jan 2025 13:15:53 +0100 Subject: [PATCH 03/36] Removed an incorrect date/time example from the docs --- docs/_pages/datetimespans.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/_pages/datetimespans.md b/docs/_pages/datetimespans.md index a42b49bed3..b42d08d41a 100644 --- a/docs/_pages/datetimespans.md +++ b/docs/_pages/datetimespans.md @@ -43,10 +43,6 @@ var theDatetimeOffset = 1.March(2010).At(22, 15).WithOffset(2.Hours()); // Asserts the point in time. theDatetimeOffset.Should().Be(1.March(2010).At(21, 15).WithOffset(1.Hours())); theDatetimeOffset.Should().NotBe(1.March(2010).At(21, 15).WithOffset(1.Hours())); - -//Asserts the calendar date/time and the offset -theDatetimeOffset.Should().BeExactly(1.March(2010).At(21, 15).WithOffset(1.Hours())); -theDatetimeOffset.Should().NotBeExactly(1.March(2010).At(21, 15).WithOffset(1.Hours())); ``` Notice how we use extension methods like `March`, `At` to represent dates in a more human readable form. There's a lot more like these, including `2000.Microseconds()`, `3.Nanoseconds` as well as methods like `AsLocal` and `AsUtc` to convert between representations. You can even do relative calculations like `2.Hours().Before(DateTime.Now)`. From af3c77c3a6dbc9527febe975ea1e4dce170610a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 15:54:09 +0000 Subject: [PATCH 04/36] Bump Microsoft.Testing.Extensions.TrxReport from 1.5.1 to 1.5.3 Bumps [Microsoft.Testing.Extensions.TrxReport](https://github.com/microsoft/testfx) from 1.5.1 to 1.5.3. - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog-Platform.md) - [Commits](https://github.com/microsoft/testfx/commits) --- updated-dependencies: - dependency-name: Microsoft.Testing.Extensions.TrxReport dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj index cb365b4137..2c5343bb1e 100644 --- a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj +++ b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj @@ -12,7 +12,7 @@ - + From f98bab0d07ba158fb27e4bdd14206f551d9a38ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 16:30:59 +0000 Subject: [PATCH 05/36] Bump TUnit from 0.6.154 to 0.7.24 Bumps [TUnit](https://github.com/thomhurst/TUnit) from 0.6.154 to 0.7.24. - [Release notes](https://github.com/thomhurst/TUnit/releases) - [Commits](https://github.com/thomhurst/TUnit/compare/v0.6.154...v0.7.24) --- updated-dependencies: - dependency-name: TUnit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj index 2c5343bb1e..68546f3aa1 100644 --- a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj +++ b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj @@ -11,7 +11,7 @@ - + From 56d403e439bdcce946c669b179f62e9f497cd19a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 17:49:34 +0100 Subject: [PATCH 06/36] Bump the mstest group with 2 updates (#2991) * Bump the mstest group with 2 updates Bumps the mstest group with 2 updates: [MSTest.TestAdapter](https://github.com/microsoft/testfx) and [MSTest.TestFramework](https://github.com/microsoft/testfx). Updates `MSTest.TestAdapter` from 3.7.1 to 3.7.3 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.7.1...v3.7.3) Updates `MSTest.TestFramework` from 3.7.1 to 3.7.3 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.7.1...v3.7.3) --- updated-dependencies: - dependency-name: MSTest.TestAdapter dependency-type: direct:production update-type: version-update:semver-patch dependency-group: mstest - dependency-name: MSTest.TestFramework dependency-type: direct:production update-type: version-update:semver-patch dependency-group: mstest ... Signed-off-by: dependabot[bot] * Update MSTest for UWP --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonas Nyrup --- Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj | 4 ++-- Tests/UWP.Specs/UWP.Specs.csproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj b/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj index 5486226199..4450f2c3db 100644 --- a/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj +++ b/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/Tests/UWP.Specs/UWP.Specs.csproj b/Tests/UWP.Specs/UWP.Specs.csproj index c1bca1a52f..25dbdc473f 100644 --- a/Tests/UWP.Specs/UWP.Specs.csproj +++ b/Tests/UWP.Specs/UWP.Specs.csproj @@ -88,10 +88,10 @@ 6.2.14 - 3.7.0 + 3.7.3 - 3.7.0 + 3.7.3 4.7.0 From e38bf972adf2f61836e701bbc15344499695dd8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Luthi?= Date: Sat, 1 Feb 2025 17:26:10 +0100 Subject: [PATCH 07/36] Backport "Add [NotNull] attribute on the Should() method for object assertions" (#2987) --- Src/FluentAssertions/AssertionExtensions.cs | 93 ++++++++-------- .../DataRowAssertionExtensions.cs | 2 +- .../DataSetAssertionExtensions.cs | 2 +- .../DataTableAssertionExtensions.cs | 2 +- .../EnumAssertionsExtensions.cs | 3 +- .../Xml/XmlAssertionExtensions.cs | 5 +- .../FluentAssertions/net47.verified.txt | 98 ++++++++--------- .../FluentAssertions/net6.0.verified.txt | 102 +++++++++--------- .../netstandard2.0.verified.txt | 98 ++++++++--------- .../netstandard2.1.verified.txt | 98 ++++++++--------- .../AssertionExtensionsSpecs.cs | 42 +++++++- docs/_pages/releases.md | 5 + 12 files changed, 299 insertions(+), 251 deletions(-) diff --git a/Src/FluentAssertions/AssertionExtensions.cs b/Src/FluentAssertions/AssertionExtensions.cs index d16c01d5d7..5beb269dcd 100644 --- a/Src/FluentAssertions/AssertionExtensions.cs +++ b/Src/FluentAssertions/AssertionExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.Data; @@ -21,6 +21,7 @@ using FluentAssertions.Types; using FluentAssertions.Xml; using JetBrains.Annotations; +using NotNullAttribute = System.Diagnostics.CodeAnalysis.NotNullAttribute; #if !NETSTANDARD2_0 using FluentAssertions.Events; #endif @@ -172,7 +173,7 @@ public static ExecutionTimeAssertions Should(this ExecutionTime executionTime) /// current . /// [Pure] - public static AssemblyAssertions Should(this Assembly assembly) + public static AssemblyAssertions Should([NotNull] this Assembly assembly) { return new AssemblyAssertions(assembly); } @@ -182,7 +183,7 @@ public static AssemblyAssertions Should(this Assembly assembly) /// current . /// [Pure] - public static XDocumentAssertions Should(this XDocument actualValue) + public static XDocumentAssertions Should([NotNull] this XDocument actualValue) { return new XDocumentAssertions(actualValue); } @@ -192,7 +193,7 @@ public static XDocumentAssertions Should(this XDocument actualValue) /// current . /// [Pure] - public static XElementAssertions Should(this XElement actualValue) + public static XElementAssertions Should([NotNull] this XElement actualValue) { return new XElementAssertions(actualValue); } @@ -202,7 +203,7 @@ public static XElementAssertions Should(this XElement actualValue) /// current . /// [Pure] - public static XAttributeAssertions Should(this XAttribute actualValue) + public static XAttributeAssertions Should([NotNull] this XAttribute actualValue) { return new XAttributeAssertions(actualValue); } @@ -212,7 +213,7 @@ public static XAttributeAssertions Should(this XAttribute actualValue) /// current . /// [Pure] - public static StreamAssertions Should(this Stream actualValue) + public static StreamAssertions Should([NotNull] this Stream actualValue) { return new StreamAssertions(actualValue); } @@ -222,7 +223,7 @@ public static StreamAssertions Should(this Stream actualValue) /// current . /// [Pure] - public static BufferedStreamAssertions Should(this BufferedStream actualValue) + public static BufferedStreamAssertions Should([NotNull] this BufferedStream actualValue) { return new BufferedStreamAssertions(actualValue); } @@ -279,7 +280,7 @@ private static void ForceEnumeration(T subject, Func enumerab /// current . /// [Pure] - public static ObjectAssertions Should(this object actualValue) + public static ObjectAssertions Should([NotNull] this object actualValue) { return new ObjectAssertions(actualValue); } @@ -299,7 +300,7 @@ public static BooleanAssertions Should(this bool actualValue) /// current nullable . /// [Pure] - public static NullableBooleanAssertions Should(this bool? actualValue) + public static NullableBooleanAssertions Should([NotNull] this bool? actualValue) { return new NullableBooleanAssertions(actualValue); } @@ -309,7 +310,7 @@ public static NullableBooleanAssertions Should(this bool? actualValue) /// current . /// [Pure] - public static HttpResponseMessageAssertions Should(this HttpResponseMessage actualValue) + public static HttpResponseMessageAssertions Should([NotNull] this HttpResponseMessage actualValue) { return new HttpResponseMessageAssertions(actualValue); } @@ -329,7 +330,7 @@ public static GuidAssertions Should(this Guid actualValue) /// current nullable . /// [Pure] - public static NullableGuidAssertions Should(this Guid? actualValue) + public static NullableGuidAssertions Should([NotNull] this Guid? actualValue) { return new NullableGuidAssertions(actualValue); } @@ -339,7 +340,7 @@ public static NullableGuidAssertions Should(this Guid? actualValue) /// current . /// [Pure] - public static GenericCollectionAssertions Should(this IEnumerable actualValue) + public static GenericCollectionAssertions Should([NotNull] this IEnumerable actualValue) { return new GenericCollectionAssertions(actualValue); } @@ -349,7 +350,7 @@ public static GenericCollectionAssertions Should(this IEnumerable actua /// current . /// [Pure] - public static StringCollectionAssertions Should(this IEnumerable @this) + public static StringCollectionAssertions Should([NotNull] this IEnumerable @this) { return new StringCollectionAssertions(@this); } @@ -360,7 +361,7 @@ public static StringCollectionAssertions Should(this IEnumerable @this) /// [Pure] public static GenericDictionaryAssertions, TKey, TValue> Should( - this IDictionary actualValue) + [NotNull] this IDictionary actualValue) { return new GenericDictionaryAssertions, TKey, TValue>(actualValue); } @@ -371,7 +372,7 @@ public static GenericDictionaryAssertions, TKey, TValu /// [Pure] public static GenericDictionaryAssertions>, TKey, TValue> Should( - this IEnumerable> actualValue) + [NotNull] this IEnumerable> actualValue) { return new GenericDictionaryAssertions>, TKey, TValue>(actualValue); } @@ -382,7 +383,7 @@ public static GenericDictionaryAssertions /// [Pure] public static GenericDictionaryAssertions Should( - this TCollection actualValue) + [NotNull] this TCollection actualValue) where TCollection : IEnumerable> { return new GenericDictionaryAssertions(actualValue); @@ -392,7 +393,7 @@ public static GenericDictionaryAssertions Should. /// [Pure] - public static GenericCollectionAssertions Should(this DataTableCollection actualValue) + public static GenericCollectionAssertions Should([NotNull] this DataTableCollection actualValue) { return new GenericCollectionAssertions( ReadOnlyNonGenericCollectionWrapper.Create(actualValue)); @@ -402,7 +403,7 @@ public static GenericCollectionAssertions Should(this DataTableCollec /// Returns an assertions object that provides methods for asserting the state of a . /// [Pure] - public static GenericCollectionAssertions Should(this DataColumnCollection actualValue) + public static GenericCollectionAssertions Should([NotNull] this DataColumnCollection actualValue) { return new GenericCollectionAssertions( ReadOnlyNonGenericCollectionWrapper.Create(actualValue)); @@ -412,7 +413,7 @@ public static GenericCollectionAssertions Should(this DataColumnColl /// Returns an assertions object that provides methods for asserting the state of a . /// [Pure] - public static GenericCollectionAssertions Should(this DataRowCollection actualValue) + public static GenericCollectionAssertions Should([NotNull] this DataRowCollection actualValue) { return new GenericCollectionAssertions( ReadOnlyNonGenericCollectionWrapper.Create(actualValue)); @@ -423,7 +424,7 @@ public static GenericCollectionAssertions Should(this DataRowCollection /// current . /// [Pure] - public static DataColumnAssertions Should(this DataColumn actualValue) + public static DataColumnAssertions Should([NotNull] this DataColumn actualValue) { return new DataColumnAssertions(actualValue); } @@ -453,7 +454,7 @@ public static DateTimeOffsetAssertions Should(this DateTimeOffset actualValue) /// current nullable . /// [Pure] - public static NullableDateTimeAssertions Should(this DateTime? actualValue) + public static NullableDateTimeAssertions Should([NotNull] this DateTime? actualValue) { return new NullableDateTimeAssertions(actualValue); } @@ -463,7 +464,7 @@ public static NullableDateTimeAssertions Should(this DateTime? actualValue) /// current nullable . /// [Pure] - public static NullableDateTimeOffsetAssertions Should(this DateTimeOffset? actualValue) + public static NullableDateTimeOffsetAssertions Should([NotNull] this DateTimeOffset? actualValue) { return new NullableDateTimeOffsetAssertions(actualValue); } @@ -484,7 +485,7 @@ public static DateOnlyAssertions Should(this DateOnly actualValue) /// current nullable . /// [Pure] - public static NullableDateOnlyAssertions Should(this DateOnly? actualValue) + public static NullableDateOnlyAssertions Should([NotNull] this DateOnly? actualValue) { return new NullableDateOnlyAssertions(actualValue); } @@ -504,7 +505,7 @@ public static TimeOnlyAssertions Should(this TimeOnly actualValue) /// current nullable . /// [Pure] - public static NullableTimeOnlyAssertions Should(this TimeOnly? actualValue) + public static NullableTimeOnlyAssertions Should([NotNull] this TimeOnly? actualValue) { return new NullableTimeOnlyAssertions(actualValue); } @@ -516,7 +517,7 @@ public static NullableTimeOnlyAssertions Should(this TimeOnly? actualValue) /// current . /// [Pure] - public static ComparableTypeAssertions Should(this IComparable comparableValue) + public static ComparableTypeAssertions Should([NotNull] this IComparable comparableValue) { return new ComparableTypeAssertions(comparableValue); } @@ -536,7 +537,7 @@ public static NumericAssertions Should(this int actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this int? actualValue) + public static NullableNumericAssertions Should([NotNull] this int? actualValue) { return new NullableInt32Assertions(actualValue); } @@ -556,7 +557,7 @@ public static NumericAssertions Should(this uint actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this uint? actualValue) + public static NullableNumericAssertions Should([NotNull] this uint? actualValue) { return new NullableUInt32Assertions(actualValue); } @@ -576,7 +577,7 @@ public static NumericAssertions Should(this decimal actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this decimal? actualValue) + public static NullableNumericAssertions Should([NotNull] this decimal? actualValue) { return new NullableDecimalAssertions(actualValue); } @@ -596,7 +597,7 @@ public static NumericAssertions Should(this byte actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this byte? actualValue) + public static NullableNumericAssertions Should([NotNull] this byte? actualValue) { return new NullableByteAssertions(actualValue); } @@ -616,7 +617,7 @@ public static NumericAssertions Should(this sbyte actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this sbyte? actualValue) + public static NullableNumericAssertions Should([NotNull] this sbyte? actualValue) { return new NullableSByteAssertions(actualValue); } @@ -636,7 +637,7 @@ public static NumericAssertions Should(this short actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this short? actualValue) + public static NullableNumericAssertions Should([NotNull] this short? actualValue) { return new NullableInt16Assertions(actualValue); } @@ -656,7 +657,7 @@ public static NumericAssertions Should(this ushort actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this ushort? actualValue) + public static NullableNumericAssertions Should([NotNull] this ushort? actualValue) { return new NullableUInt16Assertions(actualValue); } @@ -676,7 +677,7 @@ public static NumericAssertions Should(this long actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this long? actualValue) + public static NullableNumericAssertions Should([NotNull] this long? actualValue) { return new NullableInt64Assertions(actualValue); } @@ -696,7 +697,7 @@ public static NumericAssertions Should(this ulong actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this ulong? actualValue) + public static NullableNumericAssertions Should([NotNull] this ulong? actualValue) { return new NullableUInt64Assertions(actualValue); } @@ -716,7 +717,7 @@ public static NumericAssertions Should(this float actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this float? actualValue) + public static NullableNumericAssertions Should([NotNull] this float? actualValue) { return new NullableSingleAssertions(actualValue); } @@ -736,7 +737,7 @@ public static NumericAssertions Should(this double actualValue) /// current nullable . /// [Pure] - public static NullableNumericAssertions Should(this double? actualValue) + public static NullableNumericAssertions Should([NotNull] this double? actualValue) { return new NullableDoubleAssertions(actualValue); } @@ -746,7 +747,7 @@ public static NullableNumericAssertions Should(this double? actualValue) /// current . /// [Pure] - public static StringAssertions Should(this string actualValue) + public static StringAssertions Should([NotNull] this string actualValue) { return new StringAssertions(actualValue); } @@ -766,7 +767,7 @@ public static SimpleTimeSpanAssertions Should(this TimeSpan actualValue) /// current nullable . /// [Pure] - public static NullableSimpleTimeSpanAssertions Should(this TimeSpan? actualValue) + public static NullableSimpleTimeSpanAssertions Should([NotNull] this TimeSpan? actualValue) { return new NullableSimpleTimeSpanAssertions(actualValue); } @@ -776,7 +777,7 @@ public static NullableSimpleTimeSpanAssertions Should(this TimeSpan? actualValue /// current . /// [Pure] - public static TypeAssertions Should(this Type subject) + public static TypeAssertions Should([NotNull] this Type subject) { return new TypeAssertions(subject); } @@ -800,7 +801,7 @@ public static TypeSelectorAssertions Should(this TypeSelector typeSelector) /// /// [Pure] - public static ConstructorInfoAssertions Should(this ConstructorInfo constructorInfo) + public static ConstructorInfoAssertions Should([NotNull] this ConstructorInfo constructorInfo) { return new ConstructorInfoAssertions(constructorInfo); } @@ -810,7 +811,7 @@ public static ConstructorInfoAssertions Should(this ConstructorInfo constructorI /// /// [Pure] - public static MethodInfoAssertions Should(this MethodInfo methodInfo) + public static MethodInfoAssertions Should([NotNull] this MethodInfo methodInfo) { return new MethodInfoAssertions(methodInfo); } @@ -835,7 +836,7 @@ public static MethodInfoSelectorAssertions Should(this MethodInfoSelector method /// /// [Pure] - public static PropertyInfoAssertions Should(this PropertyInfo propertyInfo) + public static PropertyInfoAssertions Should([NotNull] this PropertyInfo propertyInfo) { return new PropertyInfoAssertions(propertyInfo); } @@ -859,7 +860,7 @@ public static PropertyInfoSelectorAssertions Should(this PropertyInfoSelector pr /// current . /// [Pure] - public static ActionAssertions Should(this Action action) + public static ActionAssertions Should([NotNull] this Action action) { return new ActionAssertions(action, Extractor); } @@ -869,7 +870,7 @@ public static ActionAssertions Should(this Action action) /// current . /// [Pure] - public static NonGenericAsyncFunctionAssertions Should(this Func action) + public static NonGenericAsyncFunctionAssertions Should([NotNull] this Func action) { return new NonGenericAsyncFunctionAssertions(action, Extractor); } @@ -879,7 +880,7 @@ public static NonGenericAsyncFunctionAssertions Should(this Func action) /// current System.Func{Task{T}}. /// [Pure] - public static GenericAsyncFunctionAssertions Should(this Func> action) + public static GenericAsyncFunctionAssertions Should([NotNull] this Func> action) { return new GenericAsyncFunctionAssertions(action, Extractor); } @@ -889,7 +890,7 @@ public static GenericAsyncFunctionAssertions Should(this Func> act /// current . /// [Pure] - public static FunctionAssertions Should(this Func func) + public static FunctionAssertions Should([NotNull] this Func func) { return new FunctionAssertions(func, Extractor); } diff --git a/Src/FluentAssertions/DataRowAssertionExtensions.cs b/Src/FluentAssertions/DataRowAssertionExtensions.cs index b48db92509..eba15937e8 100644 --- a/Src/FluentAssertions/DataRowAssertionExtensions.cs +++ b/Src/FluentAssertions/DataRowAssertionExtensions.cs @@ -16,7 +16,7 @@ public static class DataRowAssertionExtensions /// current . /// [Pure] - public static DataRowAssertions Should(this TDataRow actualValue) + public static DataRowAssertions Should([System.Diagnostics.CodeAnalysis.NotNullAttribute] this TDataRow actualValue) where TDataRow : DataRow { return new DataRowAssertions(actualValue); diff --git a/Src/FluentAssertions/DataSetAssertionExtensions.cs b/Src/FluentAssertions/DataSetAssertionExtensions.cs index e993ddf88b..0afdeed8cd 100644 --- a/Src/FluentAssertions/DataSetAssertionExtensions.cs +++ b/Src/FluentAssertions/DataSetAssertionExtensions.cs @@ -16,7 +16,7 @@ public static class DataSetAssertionExtensions /// current . /// [Pure] - public static DataSetAssertions Should(this TDataSet actualValue) + public static DataSetAssertions Should([System.Diagnostics.CodeAnalysis.NotNullAttribute] this TDataSet actualValue) where TDataSet : DataSet { return new DataSetAssertions(actualValue); diff --git a/Src/FluentAssertions/DataTableAssertionExtensions.cs b/Src/FluentAssertions/DataTableAssertionExtensions.cs index ee7ea0e191..e2687ba51b 100644 --- a/Src/FluentAssertions/DataTableAssertionExtensions.cs +++ b/Src/FluentAssertions/DataTableAssertionExtensions.cs @@ -16,7 +16,7 @@ public static class DataTableAssertionExtensions /// current . /// [Pure] - public static DataTableAssertions Should(this TDataTable actualValue) + public static DataTableAssertions Should([System.Diagnostics.CodeAnalysis.NotNullAttribute] this TDataTable actualValue) where TDataTable : DataTable { return new DataTableAssertions(actualValue); diff --git a/Src/FluentAssertions/EnumAssertionsExtensions.cs b/Src/FluentAssertions/EnumAssertionsExtensions.cs index 31688fb9cc..fa447a7d1f 100644 --- a/Src/FluentAssertions/EnumAssertionsExtensions.cs +++ b/Src/FluentAssertions/EnumAssertionsExtensions.cs @@ -1,5 +1,6 @@ using System; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using FluentAssertions.Primitives; @@ -27,7 +28,7 @@ public static EnumAssertions Should(this TEnum @enum) /// current . /// [Pure] - public static NullableEnumAssertions Should(this TEnum? @enum) + public static NullableEnumAssertions Should([NotNull] this TEnum? @enum) where TEnum : struct, Enum { return new NullableEnumAssertions(@enum); diff --git a/Src/FluentAssertions/Xml/XmlAssertionExtensions.cs b/Src/FluentAssertions/Xml/XmlAssertionExtensions.cs index 771bd359be..2db9562915 100644 --- a/Src/FluentAssertions/Xml/XmlAssertionExtensions.cs +++ b/Src/FluentAssertions/Xml/XmlAssertionExtensions.cs @@ -1,4 +1,5 @@ using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Xml; using FluentAssertions.Xml; @@ -7,12 +8,12 @@ namespace FluentAssertions; [DebuggerNonUserCode] public static class XmlAssertionExtensions { - public static XmlNodeAssertions Should(this XmlNode actualValue) + public static XmlNodeAssertions Should([NotNull] this XmlNode actualValue) { return new XmlNodeAssertions(actualValue); } - public static XmlElementAssertions Should(this XmlElement actualValue) + public static XmlElementAssertions Should([NotNull] this XmlElement actualValue) { return new XmlElementAssertions(actualValue); } diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt index 021b98ac14..982d423d22 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt @@ -57,58 +57,58 @@ namespace FluentAssertions [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Types.TypeSelectorAssertions _) { } - public static FluentAssertions.Specialized.ActionAssertions Should(this System.Action action) { } - public static FluentAssertions.Collections.StringCollectionAssertions Should(this System.Collections.Generic.IEnumerable @this) { } - public static FluentAssertions.Data.DataColumnAssertions Should(this System.Data.DataColumn actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataColumnCollection actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataRowCollection actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataTableCollection actualValue) { } + public static FluentAssertions.Specialized.ActionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Action action) { } + public static FluentAssertions.Collections.StringCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable @this) { } + public static FluentAssertions.Data.DataColumnAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataColumn actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataColumnCollection actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataRowCollection actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataTableCollection actualValue) { } public static FluentAssertions.Primitives.DateTimeAssertions Should(this System.DateTime actualValue) { } - public static FluentAssertions.Primitives.NullableDateTimeAssertions Should(this System.DateTime? actualValue) { } + public static FluentAssertions.Primitives.NullableDateTimeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateTime? actualValue) { } public static FluentAssertions.Primitives.DateTimeOffsetAssertions Should(this System.DateTimeOffset actualValue) { } - public static FluentAssertions.Primitives.NullableDateTimeOffsetAssertions Should(this System.DateTimeOffset? actualValue) { } - public static FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions Should(this System.Func action) { } + public static FluentAssertions.Primitives.NullableDateTimeOffsetAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateTimeOffset? actualValue) { } + public static FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func action) { } public static FluentAssertions.Primitives.GuidAssertions Should(this System.Guid actualValue) { } - public static FluentAssertions.Primitives.NullableGuidAssertions Should(this System.Guid? actualValue) { } - public static FluentAssertions.Streams.BufferedStreamAssertions Should(this System.IO.BufferedStream actualValue) { } - public static FluentAssertions.Streams.StreamAssertions Should(this System.IO.Stream actualValue) { } - public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should(this System.Net.Http.HttpResponseMessage actualValue) { } - public static FluentAssertions.Reflection.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { } - public static FluentAssertions.Types.ConstructorInfoAssertions Should(this System.Reflection.ConstructorInfo constructorInfo) { } - public static FluentAssertions.Types.MethodInfoAssertions Should(this System.Reflection.MethodInfo methodInfo) { } - public static FluentAssertions.Types.PropertyInfoAssertions Should(this System.Reflection.PropertyInfo propertyInfo) { } + public static FluentAssertions.Primitives.NullableGuidAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Guid? actualValue) { } + public static FluentAssertions.Streams.BufferedStreamAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IO.BufferedStream actualValue) { } + public static FluentAssertions.Streams.StreamAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IO.Stream actualValue) { } + public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Net.Http.HttpResponseMessage actualValue) { } + public static FluentAssertions.Reflection.AssemblyAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.Assembly assembly) { } + public static FluentAssertions.Types.ConstructorInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.ConstructorInfo constructorInfo) { } + public static FluentAssertions.Types.MethodInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.MethodInfo methodInfo) { } + public static FluentAssertions.Types.PropertyInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.PropertyInfo propertyInfo) { } public static FluentAssertions.Primitives.SimpleTimeSpanAssertions Should(this System.TimeSpan actualValue) { } - public static FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions Should(this System.TimeSpan? actualValue) { } - public static FluentAssertions.Types.TypeAssertions Should(this System.Type subject) { } - public static FluentAssertions.Xml.XAttributeAssertions Should(this System.Xml.Linq.XAttribute actualValue) { } - public static FluentAssertions.Xml.XDocumentAssertions Should(this System.Xml.Linq.XDocument actualValue) { } - public static FluentAssertions.Xml.XElementAssertions Should(this System.Xml.Linq.XElement actualValue) { } + public static FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.TimeSpan? actualValue) { } + public static FluentAssertions.Types.TypeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Type subject) { } + public static FluentAssertions.Xml.XAttributeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XAttribute actualValue) { } + public static FluentAssertions.Xml.XDocumentAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XDocument actualValue) { } + public static FluentAssertions.Xml.XElementAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XElement actualValue) { } public static FluentAssertions.Primitives.BooleanAssertions Should(this bool actualValue) { } - public static FluentAssertions.Primitives.NullableBooleanAssertions Should(this bool? actualValue) { } + public static FluentAssertions.Primitives.NullableBooleanAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this bool? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this byte actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this byte? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this byte? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this decimal actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this decimal? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this decimal? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this double actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this double? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this double? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this float actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this float? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this float? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this int actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this int? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this int? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this long actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this long? actualValue) { } - public static FluentAssertions.Primitives.ObjectAssertions Should(this object actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this long? actualValue) { } + public static FluentAssertions.Primitives.ObjectAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this object actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this sbyte actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this sbyte? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this sbyte? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this short actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this short? actualValue) { } - public static FluentAssertions.Primitives.StringAssertions Should(this string actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this short? actualValue) { } + public static FluentAssertions.Primitives.StringAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this string actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this uint actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this uint? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this uint? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this ulong actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this ulong? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this ulong? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this ushort actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this ushort? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this ushort? actualValue) { } [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.BooleanAssertions _) @@ -137,10 +137,10 @@ namespace FluentAssertions "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.SimpleTimeSpanAssertions _) where TAssertions : FluentAssertions.Primitives.SimpleTimeSpanAssertions { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Collections.Generic.IEnumerable actualValue) { } - public static FluentAssertions.Specialized.GenericAsyncFunctionAssertions Should(this System.Func> action) { } - public static FluentAssertions.Specialized.FunctionAssertions Should(this System.Func func) { } - public static FluentAssertions.Numeric.ComparableTypeAssertions Should(this System.IComparable comparableValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable actualValue) { } + public static FluentAssertions.Specialized.GenericAsyncFunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func> action) { } + public static FluentAssertions.Specialized.FunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func func) { } + public static FluentAssertions.Numeric.ComparableTypeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IComparable comparableValue) { } public static FluentAssertions.Specialized.TaskCompletionSourceAssertions Should(this System.Threading.Tasks.TaskCompletionSource tcs) { } [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] @@ -156,9 +156,9 @@ namespace FluentAssertions "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.ReferenceTypeAssertions _) where TAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions { } - public static FluentAssertions.Collections.GenericDictionaryAssertions, TKey, TValue> Should(this System.Collections.Generic.IDictionary actualValue) { } - public static FluentAssertions.Collections.GenericDictionaryAssertions>, TKey, TValue> Should(this System.Collections.Generic.IEnumerable> actualValue) { } - public static FluentAssertions.Collections.GenericDictionaryAssertions Should(this TCollection actualValue) + public static FluentAssertions.Collections.GenericDictionaryAssertions, TKey, TValue> Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IDictionary actualValue) { } + public static FluentAssertions.Collections.GenericDictionaryAssertions>, TKey, TValue> Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable> actualValue) { } + public static FluentAssertions.Collections.GenericDictionaryAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TCollection actualValue) where TCollection : System.Collections.Generic.IEnumerable> { } } public static class AssertionOptions @@ -206,7 +206,7 @@ namespace FluentAssertions } public static class DataRowAssertionExtensions { - public static FluentAssertions.Data.DataRowAssertions Should(this TDataRow actualValue) + public static FluentAssertions.Data.DataRowAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataRow actualValue) where TDataRow : System.Data.DataRow { } } public static class DataRowCollectionAssertionExtensions @@ -218,12 +218,12 @@ namespace FluentAssertions } public static class DataSetAssertionExtensions { - public static FluentAssertions.Data.DataSetAssertions Should(this TDataSet actualValue) + public static FluentAssertions.Data.DataSetAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataSet actualValue) where TDataSet : System.Data.DataSet { } } public static class DataTableAssertionExtensions { - public static FluentAssertions.Data.DataTableAssertions Should(this TDataTable actualValue) + public static FluentAssertions.Data.DataTableAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataTable actualValue) where TDataTable : System.Data.DataTable { } } public static class DataTableCollectionAssertionExtensions @@ -239,7 +239,7 @@ namespace FluentAssertions { public static FluentAssertions.Primitives.EnumAssertions Should(this TEnum @enum) where TEnum : struct, System.Enum { } - public static FluentAssertions.Primitives.NullableEnumAssertions Should(this TEnum? @enum) + public static FluentAssertions.Primitives.NullableEnumAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TEnum? @enum) where TEnum : struct, System.Enum { } } public class EquivalencyPlan : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -398,8 +398,8 @@ namespace FluentAssertions } public static class XmlAssertionExtensions { - public static FluentAssertions.Xml.XmlElementAssertions Should(this System.Xml.XmlElement actualValue) { } - public static FluentAssertions.Xml.XmlNodeAssertions Should(this System.Xml.XmlNode actualValue) { } + public static FluentAssertions.Xml.XmlElementAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.XmlElement actualValue) { } + public static FluentAssertions.Xml.XmlNodeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.XmlNode actualValue) { } } } namespace FluentAssertions.Collections diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt index 4f53076eae..c980fab663 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt @@ -57,63 +57,63 @@ namespace FluentAssertions [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Types.TypeSelectorAssertions _) { } - public static FluentAssertions.Specialized.ActionAssertions Should(this System.Action action) { } - public static FluentAssertions.Collections.StringCollectionAssertions Should(this System.Collections.Generic.IEnumerable @this) { } - public static FluentAssertions.Data.DataColumnAssertions Should(this System.Data.DataColumn actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataColumnCollection actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataRowCollection actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataTableCollection actualValue) { } + public static FluentAssertions.Specialized.ActionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Action action) { } + public static FluentAssertions.Collections.StringCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable @this) { } + public static FluentAssertions.Data.DataColumnAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataColumn actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataColumnCollection actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataRowCollection actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataTableCollection actualValue) { } public static FluentAssertions.Primitives.DateOnlyAssertions Should(this System.DateOnly actualValue) { } - public static FluentAssertions.Primitives.NullableDateOnlyAssertions Should(this System.DateOnly? actualValue) { } + public static FluentAssertions.Primitives.NullableDateOnlyAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateOnly? actualValue) { } public static FluentAssertions.Primitives.DateTimeAssertions Should(this System.DateTime actualValue) { } - public static FluentAssertions.Primitives.NullableDateTimeAssertions Should(this System.DateTime? actualValue) { } + public static FluentAssertions.Primitives.NullableDateTimeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateTime? actualValue) { } public static FluentAssertions.Primitives.DateTimeOffsetAssertions Should(this System.DateTimeOffset actualValue) { } - public static FluentAssertions.Primitives.NullableDateTimeOffsetAssertions Should(this System.DateTimeOffset? actualValue) { } - public static FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions Should(this System.Func action) { } + public static FluentAssertions.Primitives.NullableDateTimeOffsetAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateTimeOffset? actualValue) { } + public static FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func action) { } public static FluentAssertions.Primitives.GuidAssertions Should(this System.Guid actualValue) { } - public static FluentAssertions.Primitives.NullableGuidAssertions Should(this System.Guid? actualValue) { } - public static FluentAssertions.Streams.BufferedStreamAssertions Should(this System.IO.BufferedStream actualValue) { } - public static FluentAssertions.Streams.StreamAssertions Should(this System.IO.Stream actualValue) { } - public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should(this System.Net.Http.HttpResponseMessage actualValue) { } - public static FluentAssertions.Reflection.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { } - public static FluentAssertions.Types.ConstructorInfoAssertions Should(this System.Reflection.ConstructorInfo constructorInfo) { } - public static FluentAssertions.Types.MethodInfoAssertions Should(this System.Reflection.MethodInfo methodInfo) { } - public static FluentAssertions.Types.PropertyInfoAssertions Should(this System.Reflection.PropertyInfo propertyInfo) { } + public static FluentAssertions.Primitives.NullableGuidAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Guid? actualValue) { } + public static FluentAssertions.Streams.BufferedStreamAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IO.BufferedStream actualValue) { } + public static FluentAssertions.Streams.StreamAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IO.Stream actualValue) { } + public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Net.Http.HttpResponseMessage actualValue) { } + public static FluentAssertions.Reflection.AssemblyAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.Assembly assembly) { } + public static FluentAssertions.Types.ConstructorInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.ConstructorInfo constructorInfo) { } + public static FluentAssertions.Types.MethodInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.MethodInfo methodInfo) { } + public static FluentAssertions.Types.PropertyInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.PropertyInfo propertyInfo) { } public static FluentAssertions.Specialized.TaskCompletionSourceAssertions Should(this System.Threading.Tasks.TaskCompletionSource tcs) { } public static FluentAssertions.Primitives.TimeOnlyAssertions Should(this System.TimeOnly actualValue) { } - public static FluentAssertions.Primitives.NullableTimeOnlyAssertions Should(this System.TimeOnly? actualValue) { } + public static FluentAssertions.Primitives.NullableTimeOnlyAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.TimeOnly? actualValue) { } public static FluentAssertions.Primitives.SimpleTimeSpanAssertions Should(this System.TimeSpan actualValue) { } - public static FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions Should(this System.TimeSpan? actualValue) { } - public static FluentAssertions.Types.TypeAssertions Should(this System.Type subject) { } - public static FluentAssertions.Xml.XAttributeAssertions Should(this System.Xml.Linq.XAttribute actualValue) { } - public static FluentAssertions.Xml.XDocumentAssertions Should(this System.Xml.Linq.XDocument actualValue) { } - public static FluentAssertions.Xml.XElementAssertions Should(this System.Xml.Linq.XElement actualValue) { } + public static FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.TimeSpan? actualValue) { } + public static FluentAssertions.Types.TypeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Type subject) { } + public static FluentAssertions.Xml.XAttributeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XAttribute actualValue) { } + public static FluentAssertions.Xml.XDocumentAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XDocument actualValue) { } + public static FluentAssertions.Xml.XElementAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XElement actualValue) { } public static FluentAssertions.Primitives.BooleanAssertions Should(this bool actualValue) { } - public static FluentAssertions.Primitives.NullableBooleanAssertions Should(this bool? actualValue) { } + public static FluentAssertions.Primitives.NullableBooleanAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this bool? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this byte actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this byte? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this byte? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this decimal actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this decimal? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this decimal? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this double actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this double? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this double? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this float actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this float? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this float? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this int actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this int? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this int? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this long actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this long? actualValue) { } - public static FluentAssertions.Primitives.ObjectAssertions Should(this object actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this long? actualValue) { } + public static FluentAssertions.Primitives.ObjectAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this object actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this sbyte actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this sbyte? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this sbyte? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this short actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this short? actualValue) { } - public static FluentAssertions.Primitives.StringAssertions Should(this string actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this short? actualValue) { } + public static FluentAssertions.Primitives.StringAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this string actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this uint actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this uint? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this uint? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this ulong actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this ulong? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this ulong? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this ushort actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this ushort? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this ushort? actualValue) { } [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.BooleanAssertions _) @@ -150,10 +150,10 @@ namespace FluentAssertions "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.TimeOnlyAssertions _) where TAssertions : FluentAssertions.Primitives.TimeOnlyAssertions { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Collections.Generic.IEnumerable actualValue) { } - public static FluentAssertions.Specialized.GenericAsyncFunctionAssertions Should(this System.Func> action) { } - public static FluentAssertions.Specialized.FunctionAssertions Should(this System.Func func) { } - public static FluentAssertions.Numeric.ComparableTypeAssertions Should(this System.IComparable comparableValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable actualValue) { } + public static FluentAssertions.Specialized.GenericAsyncFunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func> action) { } + public static FluentAssertions.Specialized.FunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func func) { } + public static FluentAssertions.Numeric.ComparableTypeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IComparable comparableValue) { } public static FluentAssertions.Specialized.TaskCompletionSourceAssertions Should(this System.Threading.Tasks.TaskCompletionSource tcs) { } [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] @@ -169,9 +169,9 @@ namespace FluentAssertions "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.ReferenceTypeAssertions _) where TAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions { } - public static FluentAssertions.Collections.GenericDictionaryAssertions, TKey, TValue> Should(this System.Collections.Generic.IDictionary actualValue) { } - public static FluentAssertions.Collections.GenericDictionaryAssertions>, TKey, TValue> Should(this System.Collections.Generic.IEnumerable> actualValue) { } - public static FluentAssertions.Collections.GenericDictionaryAssertions Should(this TCollection actualValue) + public static FluentAssertions.Collections.GenericDictionaryAssertions, TKey, TValue> Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IDictionary actualValue) { } + public static FluentAssertions.Collections.GenericDictionaryAssertions>, TKey, TValue> Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable> actualValue) { } + public static FluentAssertions.Collections.GenericDictionaryAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TCollection actualValue) where TCollection : System.Collections.Generic.IEnumerable> { } } public static class AssertionOptions @@ -219,7 +219,7 @@ namespace FluentAssertions } public static class DataRowAssertionExtensions { - public static FluentAssertions.Data.DataRowAssertions Should(this TDataRow actualValue) + public static FluentAssertions.Data.DataRowAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataRow actualValue) where TDataRow : System.Data.DataRow { } } public static class DataRowCollectionAssertionExtensions @@ -231,12 +231,12 @@ namespace FluentAssertions } public static class DataSetAssertionExtensions { - public static FluentAssertions.Data.DataSetAssertions Should(this TDataSet actualValue) + public static FluentAssertions.Data.DataSetAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataSet actualValue) where TDataSet : System.Data.DataSet { } } public static class DataTableAssertionExtensions { - public static FluentAssertions.Data.DataTableAssertions Should(this TDataTable actualValue) + public static FluentAssertions.Data.DataTableAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataTable actualValue) where TDataTable : System.Data.DataTable { } } public static class DataTableCollectionAssertionExtensions @@ -252,7 +252,7 @@ namespace FluentAssertions { public static FluentAssertions.Primitives.EnumAssertions Should(this TEnum @enum) where TEnum : struct, System.Enum { } - public static FluentAssertions.Primitives.NullableEnumAssertions Should(this TEnum? @enum) + public static FluentAssertions.Primitives.NullableEnumAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TEnum? @enum) where TEnum : struct, System.Enum { } } public class EquivalencyPlan : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -411,8 +411,8 @@ namespace FluentAssertions } public static class XmlAssertionExtensions { - public static FluentAssertions.Xml.XmlElementAssertions Should(this System.Xml.XmlElement actualValue) { } - public static FluentAssertions.Xml.XmlNodeAssertions Should(this System.Xml.XmlNode actualValue) { } + public static FluentAssertions.Xml.XmlElementAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.XmlElement actualValue) { } + public static FluentAssertions.Xml.XmlNodeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.XmlNode actualValue) { } } } namespace FluentAssertions.Collections diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt index 65a643089c..e0d61489e4 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt @@ -56,58 +56,58 @@ namespace FluentAssertions [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Types.TypeSelectorAssertions _) { } - public static FluentAssertions.Specialized.ActionAssertions Should(this System.Action action) { } - public static FluentAssertions.Collections.StringCollectionAssertions Should(this System.Collections.Generic.IEnumerable @this) { } - public static FluentAssertions.Data.DataColumnAssertions Should(this System.Data.DataColumn actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataColumnCollection actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataRowCollection actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataTableCollection actualValue) { } + public static FluentAssertions.Specialized.ActionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Action action) { } + public static FluentAssertions.Collections.StringCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable @this) { } + public static FluentAssertions.Data.DataColumnAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataColumn actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataColumnCollection actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataRowCollection actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataTableCollection actualValue) { } public static FluentAssertions.Primitives.DateTimeAssertions Should(this System.DateTime actualValue) { } - public static FluentAssertions.Primitives.NullableDateTimeAssertions Should(this System.DateTime? actualValue) { } + public static FluentAssertions.Primitives.NullableDateTimeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateTime? actualValue) { } public static FluentAssertions.Primitives.DateTimeOffsetAssertions Should(this System.DateTimeOffset actualValue) { } - public static FluentAssertions.Primitives.NullableDateTimeOffsetAssertions Should(this System.DateTimeOffset? actualValue) { } - public static FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions Should(this System.Func action) { } + public static FluentAssertions.Primitives.NullableDateTimeOffsetAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateTimeOffset? actualValue) { } + public static FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func action) { } public static FluentAssertions.Primitives.GuidAssertions Should(this System.Guid actualValue) { } - public static FluentAssertions.Primitives.NullableGuidAssertions Should(this System.Guid? actualValue) { } - public static FluentAssertions.Streams.BufferedStreamAssertions Should(this System.IO.BufferedStream actualValue) { } - public static FluentAssertions.Streams.StreamAssertions Should(this System.IO.Stream actualValue) { } - public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should(this System.Net.Http.HttpResponseMessage actualValue) { } - public static FluentAssertions.Reflection.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { } - public static FluentAssertions.Types.ConstructorInfoAssertions Should(this System.Reflection.ConstructorInfo constructorInfo) { } - public static FluentAssertions.Types.MethodInfoAssertions Should(this System.Reflection.MethodInfo methodInfo) { } - public static FluentAssertions.Types.PropertyInfoAssertions Should(this System.Reflection.PropertyInfo propertyInfo) { } + public static FluentAssertions.Primitives.NullableGuidAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Guid? actualValue) { } + public static FluentAssertions.Streams.BufferedStreamAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IO.BufferedStream actualValue) { } + public static FluentAssertions.Streams.StreamAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IO.Stream actualValue) { } + public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Net.Http.HttpResponseMessage actualValue) { } + public static FluentAssertions.Reflection.AssemblyAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.Assembly assembly) { } + public static FluentAssertions.Types.ConstructorInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.ConstructorInfo constructorInfo) { } + public static FluentAssertions.Types.MethodInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.MethodInfo methodInfo) { } + public static FluentAssertions.Types.PropertyInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.PropertyInfo propertyInfo) { } public static FluentAssertions.Primitives.SimpleTimeSpanAssertions Should(this System.TimeSpan actualValue) { } - public static FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions Should(this System.TimeSpan? actualValue) { } - public static FluentAssertions.Types.TypeAssertions Should(this System.Type subject) { } - public static FluentAssertions.Xml.XAttributeAssertions Should(this System.Xml.Linq.XAttribute actualValue) { } - public static FluentAssertions.Xml.XDocumentAssertions Should(this System.Xml.Linq.XDocument actualValue) { } - public static FluentAssertions.Xml.XElementAssertions Should(this System.Xml.Linq.XElement actualValue) { } + public static FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.TimeSpan? actualValue) { } + public static FluentAssertions.Types.TypeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Type subject) { } + public static FluentAssertions.Xml.XAttributeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XAttribute actualValue) { } + public static FluentAssertions.Xml.XDocumentAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XDocument actualValue) { } + public static FluentAssertions.Xml.XElementAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XElement actualValue) { } public static FluentAssertions.Primitives.BooleanAssertions Should(this bool actualValue) { } - public static FluentAssertions.Primitives.NullableBooleanAssertions Should(this bool? actualValue) { } + public static FluentAssertions.Primitives.NullableBooleanAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this bool? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this byte actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this byte? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this byte? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this decimal actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this decimal? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this decimal? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this double actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this double? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this double? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this float actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this float? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this float? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this int actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this int? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this int? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this long actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this long? actualValue) { } - public static FluentAssertions.Primitives.ObjectAssertions Should(this object actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this long? actualValue) { } + public static FluentAssertions.Primitives.ObjectAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this object actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this sbyte actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this sbyte? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this sbyte? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this short actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this short? actualValue) { } - public static FluentAssertions.Primitives.StringAssertions Should(this string actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this short? actualValue) { } + public static FluentAssertions.Primitives.StringAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this string actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this uint actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this uint? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this uint? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this ulong actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this ulong? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this ulong? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this ushort actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this ushort? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this ushort? actualValue) { } [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.BooleanAssertions _) @@ -136,10 +136,10 @@ namespace FluentAssertions "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.SimpleTimeSpanAssertions _) where TAssertions : FluentAssertions.Primitives.SimpleTimeSpanAssertions { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Collections.Generic.IEnumerable actualValue) { } - public static FluentAssertions.Specialized.GenericAsyncFunctionAssertions Should(this System.Func> action) { } - public static FluentAssertions.Specialized.FunctionAssertions Should(this System.Func func) { } - public static FluentAssertions.Numeric.ComparableTypeAssertions Should(this System.IComparable comparableValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable actualValue) { } + public static FluentAssertions.Specialized.GenericAsyncFunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func> action) { } + public static FluentAssertions.Specialized.FunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func func) { } + public static FluentAssertions.Numeric.ComparableTypeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IComparable comparableValue) { } public static FluentAssertions.Specialized.TaskCompletionSourceAssertions Should(this System.Threading.Tasks.TaskCompletionSource tcs) { } [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] @@ -155,9 +155,9 @@ namespace FluentAssertions "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.ReferenceTypeAssertions _) where TAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions { } - public static FluentAssertions.Collections.GenericDictionaryAssertions, TKey, TValue> Should(this System.Collections.Generic.IDictionary actualValue) { } - public static FluentAssertions.Collections.GenericDictionaryAssertions>, TKey, TValue> Should(this System.Collections.Generic.IEnumerable> actualValue) { } - public static FluentAssertions.Collections.GenericDictionaryAssertions Should(this TCollection actualValue) + public static FluentAssertions.Collections.GenericDictionaryAssertions, TKey, TValue> Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IDictionary actualValue) { } + public static FluentAssertions.Collections.GenericDictionaryAssertions>, TKey, TValue> Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable> actualValue) { } + public static FluentAssertions.Collections.GenericDictionaryAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TCollection actualValue) where TCollection : System.Collections.Generic.IEnumerable> { } } public static class AssertionOptions @@ -205,7 +205,7 @@ namespace FluentAssertions } public static class DataRowAssertionExtensions { - public static FluentAssertions.Data.DataRowAssertions Should(this TDataRow actualValue) + public static FluentAssertions.Data.DataRowAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataRow actualValue) where TDataRow : System.Data.DataRow { } } public static class DataRowCollectionAssertionExtensions @@ -217,12 +217,12 @@ namespace FluentAssertions } public static class DataSetAssertionExtensions { - public static FluentAssertions.Data.DataSetAssertions Should(this TDataSet actualValue) + public static FluentAssertions.Data.DataSetAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataSet actualValue) where TDataSet : System.Data.DataSet { } } public static class DataTableAssertionExtensions { - public static FluentAssertions.Data.DataTableAssertions Should(this TDataTable actualValue) + public static FluentAssertions.Data.DataTableAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataTable actualValue) where TDataTable : System.Data.DataTable { } } public static class DataTableCollectionAssertionExtensions @@ -238,7 +238,7 @@ namespace FluentAssertions { public static FluentAssertions.Primitives.EnumAssertions Should(this TEnum @enum) where TEnum : struct, System.Enum { } - public static FluentAssertions.Primitives.NullableEnumAssertions Should(this TEnum? @enum) + public static FluentAssertions.Primitives.NullableEnumAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TEnum? @enum) where TEnum : struct, System.Enum { } } public class EquivalencyPlan : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -391,8 +391,8 @@ namespace FluentAssertions } public static class XmlAssertionExtensions { - public static FluentAssertions.Xml.XmlElementAssertions Should(this System.Xml.XmlElement actualValue) { } - public static FluentAssertions.Xml.XmlNodeAssertions Should(this System.Xml.XmlNode actualValue) { } + public static FluentAssertions.Xml.XmlElementAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.XmlElement actualValue) { } + public static FluentAssertions.Xml.XmlNodeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.XmlNode actualValue) { } } } namespace FluentAssertions.Collections diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt index a225ab0c10..ae31cb0aa9 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt @@ -57,58 +57,58 @@ namespace FluentAssertions [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Types.TypeSelectorAssertions _) { } - public static FluentAssertions.Specialized.ActionAssertions Should(this System.Action action) { } - public static FluentAssertions.Collections.StringCollectionAssertions Should(this System.Collections.Generic.IEnumerable @this) { } - public static FluentAssertions.Data.DataColumnAssertions Should(this System.Data.DataColumn actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataColumnCollection actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataRowCollection actualValue) { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Data.DataTableCollection actualValue) { } + public static FluentAssertions.Specialized.ActionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Action action) { } + public static FluentAssertions.Collections.StringCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable @this) { } + public static FluentAssertions.Data.DataColumnAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataColumn actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataColumnCollection actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataRowCollection actualValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Data.DataTableCollection actualValue) { } public static FluentAssertions.Primitives.DateTimeAssertions Should(this System.DateTime actualValue) { } - public static FluentAssertions.Primitives.NullableDateTimeAssertions Should(this System.DateTime? actualValue) { } + public static FluentAssertions.Primitives.NullableDateTimeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateTime? actualValue) { } public static FluentAssertions.Primitives.DateTimeOffsetAssertions Should(this System.DateTimeOffset actualValue) { } - public static FluentAssertions.Primitives.NullableDateTimeOffsetAssertions Should(this System.DateTimeOffset? actualValue) { } - public static FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions Should(this System.Func action) { } + public static FluentAssertions.Primitives.NullableDateTimeOffsetAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.DateTimeOffset? actualValue) { } + public static FluentAssertions.Specialized.NonGenericAsyncFunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func action) { } public static FluentAssertions.Primitives.GuidAssertions Should(this System.Guid actualValue) { } - public static FluentAssertions.Primitives.NullableGuidAssertions Should(this System.Guid? actualValue) { } - public static FluentAssertions.Streams.BufferedStreamAssertions Should(this System.IO.BufferedStream actualValue) { } - public static FluentAssertions.Streams.StreamAssertions Should(this System.IO.Stream actualValue) { } - public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should(this System.Net.Http.HttpResponseMessage actualValue) { } - public static FluentAssertions.Reflection.AssemblyAssertions Should(this System.Reflection.Assembly assembly) { } - public static FluentAssertions.Types.ConstructorInfoAssertions Should(this System.Reflection.ConstructorInfo constructorInfo) { } - public static FluentAssertions.Types.MethodInfoAssertions Should(this System.Reflection.MethodInfo methodInfo) { } - public static FluentAssertions.Types.PropertyInfoAssertions Should(this System.Reflection.PropertyInfo propertyInfo) { } + public static FluentAssertions.Primitives.NullableGuidAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Guid? actualValue) { } + public static FluentAssertions.Streams.BufferedStreamAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IO.BufferedStream actualValue) { } + public static FluentAssertions.Streams.StreamAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IO.Stream actualValue) { } + public static FluentAssertions.Primitives.HttpResponseMessageAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Net.Http.HttpResponseMessage actualValue) { } + public static FluentAssertions.Reflection.AssemblyAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.Assembly assembly) { } + public static FluentAssertions.Types.ConstructorInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.ConstructorInfo constructorInfo) { } + public static FluentAssertions.Types.MethodInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.MethodInfo methodInfo) { } + public static FluentAssertions.Types.PropertyInfoAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Reflection.PropertyInfo propertyInfo) { } public static FluentAssertions.Primitives.SimpleTimeSpanAssertions Should(this System.TimeSpan actualValue) { } - public static FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions Should(this System.TimeSpan? actualValue) { } - public static FluentAssertions.Types.TypeAssertions Should(this System.Type subject) { } - public static FluentAssertions.Xml.XAttributeAssertions Should(this System.Xml.Linq.XAttribute actualValue) { } - public static FluentAssertions.Xml.XDocumentAssertions Should(this System.Xml.Linq.XDocument actualValue) { } - public static FluentAssertions.Xml.XElementAssertions Should(this System.Xml.Linq.XElement actualValue) { } + public static FluentAssertions.Primitives.NullableSimpleTimeSpanAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.TimeSpan? actualValue) { } + public static FluentAssertions.Types.TypeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Type subject) { } + public static FluentAssertions.Xml.XAttributeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XAttribute actualValue) { } + public static FluentAssertions.Xml.XDocumentAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XDocument actualValue) { } + public static FluentAssertions.Xml.XElementAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.Linq.XElement actualValue) { } public static FluentAssertions.Primitives.BooleanAssertions Should(this bool actualValue) { } - public static FluentAssertions.Primitives.NullableBooleanAssertions Should(this bool? actualValue) { } + public static FluentAssertions.Primitives.NullableBooleanAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this bool? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this byte actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this byte? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this byte? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this decimal actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this decimal? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this decimal? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this double actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this double? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this double? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this float actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this float? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this float? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this int actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this int? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this int? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this long actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this long? actualValue) { } - public static FluentAssertions.Primitives.ObjectAssertions Should(this object actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this long? actualValue) { } + public static FluentAssertions.Primitives.ObjectAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this object actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this sbyte actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this sbyte? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this sbyte? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this short actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this short? actualValue) { } - public static FluentAssertions.Primitives.StringAssertions Should(this string actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this short? actualValue) { } + public static FluentAssertions.Primitives.StringAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this string actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this uint actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this uint? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this uint? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this ulong actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this ulong? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this ulong? actualValue) { } public static FluentAssertions.Numeric.NumericAssertions Should(this ushort actualValue) { } - public static FluentAssertions.Numeric.NullableNumericAssertions Should(this ushort? actualValue) { } + public static FluentAssertions.Numeric.NullableNumericAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this ushort? actualValue) { } [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.BooleanAssertions _) @@ -137,10 +137,10 @@ namespace FluentAssertions "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.SimpleTimeSpanAssertions _) where TAssertions : FluentAssertions.Primitives.SimpleTimeSpanAssertions { } - public static FluentAssertions.Collections.GenericCollectionAssertions Should(this System.Collections.Generic.IEnumerable actualValue) { } - public static FluentAssertions.Specialized.GenericAsyncFunctionAssertions Should(this System.Func> action) { } - public static FluentAssertions.Specialized.FunctionAssertions Should(this System.Func func) { } - public static FluentAssertions.Numeric.ComparableTypeAssertions Should(this System.IComparable comparableValue) { } + public static FluentAssertions.Collections.GenericCollectionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable actualValue) { } + public static FluentAssertions.Specialized.GenericAsyncFunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func> action) { } + public static FluentAssertions.Specialized.FunctionAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Func func) { } + public static FluentAssertions.Numeric.ComparableTypeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.IComparable comparableValue) { } public static FluentAssertions.Specialized.TaskCompletionSourceAssertions Should(this System.Threading.Tasks.TaskCompletionSource tcs) { } [System.Obsolete(("You are asserting the \'AndConstraint\' itself. Remove the \'Should()\' method direct" + "ly following \'And\'"), true)] @@ -156,9 +156,9 @@ namespace FluentAssertions "ly following \'And\'"), true)] public static void Should(this FluentAssertions.Primitives.ReferenceTypeAssertions _) where TAssertions : FluentAssertions.Primitives.ReferenceTypeAssertions { } - public static FluentAssertions.Collections.GenericDictionaryAssertions, TKey, TValue> Should(this System.Collections.Generic.IDictionary actualValue) { } - public static FluentAssertions.Collections.GenericDictionaryAssertions>, TKey, TValue> Should(this System.Collections.Generic.IEnumerable> actualValue) { } - public static FluentAssertions.Collections.GenericDictionaryAssertions Should(this TCollection actualValue) + public static FluentAssertions.Collections.GenericDictionaryAssertions, TKey, TValue> Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IDictionary actualValue) { } + public static FluentAssertions.Collections.GenericDictionaryAssertions>, TKey, TValue> Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Collections.Generic.IEnumerable> actualValue) { } + public static FluentAssertions.Collections.GenericDictionaryAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TCollection actualValue) where TCollection : System.Collections.Generic.IEnumerable> { } } public static class AssertionOptions @@ -206,7 +206,7 @@ namespace FluentAssertions } public static class DataRowAssertionExtensions { - public static FluentAssertions.Data.DataRowAssertions Should(this TDataRow actualValue) + public static FluentAssertions.Data.DataRowAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataRow actualValue) where TDataRow : System.Data.DataRow { } } public static class DataRowCollectionAssertionExtensions @@ -218,12 +218,12 @@ namespace FluentAssertions } public static class DataSetAssertionExtensions { - public static FluentAssertions.Data.DataSetAssertions Should(this TDataSet actualValue) + public static FluentAssertions.Data.DataSetAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataSet actualValue) where TDataSet : System.Data.DataSet { } } public static class DataTableAssertionExtensions { - public static FluentAssertions.Data.DataTableAssertions Should(this TDataTable actualValue) + public static FluentAssertions.Data.DataTableAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TDataTable actualValue) where TDataTable : System.Data.DataTable { } } public static class DataTableCollectionAssertionExtensions @@ -239,7 +239,7 @@ namespace FluentAssertions { public static FluentAssertions.Primitives.EnumAssertions Should(this TEnum @enum) where TEnum : struct, System.Enum { } - public static FluentAssertions.Primitives.NullableEnumAssertions Should(this TEnum? @enum) + public static FluentAssertions.Primitives.NullableEnumAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this TEnum? @enum) where TEnum : struct, System.Enum { } } public class EquivalencyPlan : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable @@ -398,8 +398,8 @@ namespace FluentAssertions } public static class XmlAssertionExtensions { - public static FluentAssertions.Xml.XmlElementAssertions Should(this System.Xml.XmlElement actualValue) { } - public static FluentAssertions.Xml.XmlNodeAssertions Should(this System.Xml.XmlNode actualValue) { } + public static FluentAssertions.Xml.XmlElementAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.XmlElement actualValue) { } + public static FluentAssertions.Xml.XmlNodeAssertions Should([System.Diagnostics.CodeAnalysis.NotNull] this System.Xml.XmlNode actualValue) { } } } namespace FluentAssertions.Collections diff --git a/Tests/FluentAssertions.Specs/AssertionExtensionsSpecs.cs b/Tests/FluentAssertions.Specs/AssertionExtensionsSpecs.cs index 0b71d3a8b4..93ca8882dd 100644 --- a/Tests/FluentAssertions.Specs/AssertionExtensionsSpecs.cs +++ b/Tests/FluentAssertions.Specs/AssertionExtensionsSpecs.cs @@ -1,5 +1,6 @@ -using System; +using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using FluentAssertions.Common; @@ -157,6 +158,45 @@ public void Should_methods_have_a_matching_overload_to_guard_against_chaining_an "AssertionExtensions.cs should have a guard overload of Should calling InvalidShouldCall()"); } + [Theory] + [MemberData(nameof(GetShouldMethods), true)] + public void Should_methods_returning_reference_or_nullable_type_assertions_are_annotated_with_not_null_attribute(MethodInfo method) + { + var notNullAttribute = method.GetParameters().Single().GetCustomAttribute(); + notNullAttribute.Should().NotBeNull(); + } + + [Theory] + [MemberData(nameof(GetShouldMethods), false)] + public void Should_methods_not_returning_reference_or_nullable_type_assertions_are_not_annotated_with_not_null_attribute(MethodInfo method) + { + var notNullAttribute = method.GetParameters().Single().GetCustomAttribute(); + notNullAttribute.Should().BeNull(); + } + + public static IEnumerable GetShouldMethods(bool referenceOrNullableTypes) + { + return AllTypes.From(typeof(FluentAssertions.AssertionExtensions).Assembly) + .ThatAreClasses() + .ThatAreStatic() + .Where(t => t.IsPublic) + .SelectMany(t => t.GetMethods(BindingFlags.Static | BindingFlags.Public)) + .Where(m => m.Name == "Should" + && !IsGuardOverload(m) + && m.GetParameters().Length == 1 + && (referenceOrNullableTypes ? IsReferenceOrNullableTypeAssertion(m) : !IsReferenceOrNullableTypeAssertion(m))) + .Select(m => new object[] { m }); + } + + private static bool ReturnsReferenceTypeAssertions(MethodInfo m) => + m.ReturnType.IsAssignableToOpenGeneric(typeof(ReferenceTypeAssertions<,>)); + + private static bool IsNullableTypeAssertion(MethodInfo m) => + m.GetParameters()[0].ParameterType.IsAssignableToOpenGeneric(typeof(Nullable<>)); + + private static bool IsReferenceOrNullableTypeAssertion(MethodInfo m) => + ReturnsReferenceTypeAssertions(m) || IsNullableTypeAssertion(m); + private static bool IsGuardOverload(MethodInfo m) => m.ReturnType == typeof(void) && m.IsDefined(typeof(ObsoleteAttribute)); diff --git a/docs/_pages/releases.md b/docs/_pages/releases.md index 80de6c94b7..48390c5c32 100644 --- a/docs/_pages/releases.md +++ b/docs/_pages/releases.md @@ -7,6 +7,11 @@ sidebar: nav: "sidebar" --- +## 7.2.0 + +### Improvements +* All `Should()` methods on reference types are now annotated with the `[NotNull]` attribute for a better Fluent Assertions experience when nullable reference types are enabled - [#2987](https://github.com/fluentassertions/fluentassertions/pull/2987) + ## 7.1.0 ### Improvements From e046cef96ec0cdd0a09458de4b2f109103944d89 Mon Sep 17 00:00:00 2001 From: Jonas Nyrup Date: Sat, 1 Feb 2025 17:55:10 +0100 Subject: [PATCH 08/36] Move #2307 release notes to 7.2.0 --- docs/_pages/releases.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/_pages/releases.md b/docs/_pages/releases.md index 48390c5c32..cf5f1a03f1 100644 --- a/docs/_pages/releases.md +++ b/docs/_pages/releases.md @@ -10,13 +10,12 @@ sidebar: ## 7.2.0 ### Improvements +* Improve failure message for string assertions when checking for equality - [#2307](https://github.com/fluentassertions/fluentassertions/pull/2307) * All `Should()` methods on reference types are now annotated with the `[NotNull]` attribute for a better Fluent Assertions experience when nullable reference types are enabled - [#2987](https://github.com/fluentassertions/fluentassertions/pull/2987) ## 7.1.0 ### Improvements -* Improve failure message for string assertions when checking for equality - [#2307](https://github.com/fluentassertions/fluentassertions/pull/2307) - * Added compatibility with xUnit.net v3 - [#2970](https://github.com/fluentassertions/fluentassertions/issues/2970) * Added support for throwing TUnit exceptions when using TUnit as your testing framework - [#2971](https://github.com/fluentassertions/fluentassertions/pull/2971) From e2e0ce2735eaf33f4b1fbc2cfee98984634f17a3 Mon Sep 17 00:00:00 2001 From: ITaluone <44049228+ITaluone@users.noreply.github.com> Date: Thu, 16 Nov 2023 11:24:51 +0100 Subject: [PATCH 09/36] Remove .NET Core 2.1.x and 3.1.x from build SDK setup (#2467) --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e842f562e..8ec57bde6f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,6 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 2.1.x - 3.1.x 6.0.x 7.0.x @@ -63,8 +61,6 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | - 2.1.x - 3.1.x 6.0.x 8.0.x From 17b5618538d85a4583a3506a538b78b0971963d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:20:39 +0200 Subject: [PATCH 10/36] Bump actions/checkout from 3 to 4 (#2333) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ec57bde6f..5fd6b8ce7e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: DOTNET_NOLOGO: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -53,7 +53,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 From 8e051b3dcc56544e23ca90faa5b6f52ab56ec690 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:39:32 +0000 Subject: [PATCH 11/36] Bump actions/setup-dotnet from 3 to 4 Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 3 to 4. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5fd6b8ce7e..52431e1d44 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Setup .NET SDKs - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: | 6.0.x @@ -58,7 +58,7 @@ jobs: fetch-depth: 0 - name: Setup .NET SDKs - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: | 6.0.x From 1cc5fb08951fa48152006573506c1d68aae3ca01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 16:07:09 +0000 Subject: [PATCH 12/36] Bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 52431e1d44..661f8da345 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: file: TestResults/reports/lcov.info - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: ./Artifacts/* only-unit-tests: From d05fd9dc2b433cd990aeecebc402190597c1df5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 15:11:55 +0000 Subject: [PATCH 13/36] Bump andstor/file-existence-action from 2 to 3 Bumps [andstor/file-existence-action](https://github.com/andstor/file-existence-action) from 2 to 3. - [Release notes](https://github.com/andstor/file-existence-action/releases) - [Commits](https://github.com/andstor/file-existence-action/compare/v2...v3) --- updated-dependencies: - dependency-name: andstor/file-existence-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 661f8da345..06e708ee0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: Check for 'lcov.info' existence id: check_files - uses: andstor/file-existence-action@v2 + uses: andstor/file-existence-action@v3 with: files: "TestResults/reports/lcov.info" From 49207d880f685ca89f7aa61e76e308af80fa7715 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:55:53 +0000 Subject: [PATCH 14/36] Bump cspell from 8.17.2 to 8.17.3 Bumps [cspell](https://github.com/streetsidesoftware/cspell/tree/HEAD/packages/cspell) from 8.17.2 to 8.17.3. - [Release notes](https://github.com/streetsidesoftware/cspell/releases) - [Changelog](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell/commits/v8.17.3/packages/cspell) --- updated-dependencies: - dependency-name: cspell dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 490 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 300 insertions(+), 192 deletions(-) diff --git a/package-lock.json b/package-lock.json index d4b8075c84..2d9c68502b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,31 +7,32 @@ "": { "version": "1.0.1", "dependencies": { - "cspell": "^8.17.2" + "cspell": "^8.17.3" } }, "node_modules/@cspell/cspell-bundled-dicts": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.17.2.tgz", - "integrity": "sha512-t+DQtruJF2cYfXF5GC4F0O/PQR04hL5WH55R9oOaor5i7K8ejbw6+jex2LB0XbZFf3qBhXNSnMPuM3b/113LnA==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.17.3.tgz", + "integrity": "sha512-6uOF726o3JnExAUKM20OJJXZo+Qf9Jt64nkVwnVXx7Upqr5I9Pb1npYPEAIpUA03SnWYmKwUIqhAmkwrN+bLPA==", + "license": "MIT", "dependencies": { "@cspell/dict-ada": "^4.1.0", "@cspell/dict-al": "^1.1.0", "@cspell/dict-aws": "^4.0.9", "@cspell/dict-bash": "^4.2.0", - "@cspell/dict-companies": "^3.1.12", + "@cspell/dict-companies": "^3.1.13", "@cspell/dict-cpp": "^6.0.3", "@cspell/dict-cryptocurrencies": "^5.0.4", "@cspell/dict-csharp": "^4.0.6", "@cspell/dict-css": "^4.0.17", "@cspell/dict-dart": "^2.3.0", - "@cspell/dict-data-science": "^2.0.6", + "@cspell/dict-data-science": "^2.0.7", "@cspell/dict-django": "^4.1.4", "@cspell/dict-docker": "^1.1.12", "@cspell/dict-dotnet": "^5.0.9", "@cspell/dict-elixir": "^4.0.7", - "@cspell/dict-en_us": "^4.3.29", - "@cspell/dict-en-common-misspellings": "^2.0.8", + "@cspell/dict-en_us": "^4.3.30", + "@cspell/dict-en-common-misspellings": "^2.0.9", "@cspell/dict-en-gb": "1.1.33", "@cspell/dict-filetypes": "^3.0.10", "@cspell/dict-flutter": "^1.1.0", @@ -41,7 +42,7 @@ "@cspell/dict-gaming-terms": "^1.1.0", "@cspell/dict-git": "^3.0.4", "@cspell/dict-golang": "^6.0.18", - "@cspell/dict-google": "^1.0.5", + "@cspell/dict-google": "^1.0.8", "@cspell/dict-haskell": "^4.0.5", "@cspell/dict-html": "^4.0.11", "@cspell/dict-html-symbol-entities": "^4.0.3", @@ -56,17 +57,17 @@ "@cspell/dict-markdown": "^2.0.9", "@cspell/dict-monkeyc": "^1.0.10", "@cspell/dict-node": "^5.0.6", - "@cspell/dict-npm": "^5.1.22", + "@cspell/dict-npm": "^5.1.24", "@cspell/dict-php": "^4.0.14", "@cspell/dict-powershell": "^5.0.14", - "@cspell/dict-public-licenses": "^2.0.12", - "@cspell/dict-python": "^4.2.14", + "@cspell/dict-public-licenses": "^2.0.13", + "@cspell/dict-python": "^4.2.15", "@cspell/dict-r": "^2.1.0", "@cspell/dict-ruby": "^5.0.7", "@cspell/dict-rust": "^4.0.11", "@cspell/dict-scala": "^5.0.7", "@cspell/dict-shell": "^1.1.0", - "@cspell/dict-software-terms": "^4.2.2", + "@cspell/dict-software-terms": "^4.2.4", "@cspell/dict-sql": "^2.2.0", "@cspell/dict-svelte": "^1.0.6", "@cspell/dict-swift": "^2.0.5", @@ -79,28 +80,31 @@ } }, "node_modules/@cspell/cspell-json-reporter": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-8.17.2.tgz", - "integrity": "sha512-9QFzuSApaK7SYB50iCTRIUDjFZf6DXTFj8+qTR2cky+/YmEcHDpJieJVCd3STONO4m2JyqIsV7faEuA6M0YcHg==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-8.17.3.tgz", + "integrity": "sha512-RWSfyHOin/d9CqLjz00JMvPkag3yUSsQZr6G9BnCT5cMEO/ws8wQZzA54CNj/LAOccbknTX65SSroPPAtxs56w==", + "license": "MIT", "dependencies": { - "@cspell/cspell-types": "8.17.2" + "@cspell/cspell-types": "8.17.3" }, "engines": { "node": ">=18" } }, "node_modules/@cspell/cspell-pipe": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.17.2.tgz", - "integrity": "sha512-LOTKK+hZSUc7vaN8SBEOcv+9dMYbo84awbsjjdI+HkKVBfTt3Lzlu6IJImw39L6pTDAJ1ZxOUdWO89jcxpyihg==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.17.3.tgz", + "integrity": "sha512-DqqSWKt9NLWPGloYxZTpzUhgdW8ObMkZmOOF6TyqpJ4IbckEct8ULgskNorTNRlmmjLniaNgvg6JSHuYO3Urxw==", + "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@cspell/cspell-resolver": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.17.2.tgz", - "integrity": "sha512-Z2ndlzVIiXOCBnQby9q+OXcxeddiuCi//pnhO9Jf6Ixgthn+Yg7bwzAnHu+CM1SJaQnZCntGyimdxfojm+WDdA==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.17.3.tgz", + "integrity": "sha512-yQlVaIsWiax6RRuuacZs++kl6Y9rwH9ZkVlsG9fhdeCJ5Xf3WCW+vmX1chzhhKDzRr8CF9fsvb1uagd/5/bBYA==", + "license": "MIT", "dependencies": { "global-directory": "^4.0.1" }, @@ -109,17 +113,19 @@ } }, "node_modules/@cspell/cspell-service-bus": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.17.2.tgz", - "integrity": "sha512-Cp4kVxJRyyDRd5RVTASlu+ygWG+dgy6GyH7lzb6P8SOXt1mxzCBK6Q5Dc1XHAsvhRaLrnMziCO/5Pj9/0DKs6w==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.17.3.tgz", + "integrity": "sha512-CC3nob/Kbuesz5WTW+LjAHnDFXJrA49pW5ckmbufJxNnoAk7EJez/qr7/ELMTf6Fl3A5xZ776Lhq7738Hy/fmQ==", + "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@cspell/cspell-types": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.17.2.tgz", - "integrity": "sha512-4kMBhX92p0pchEzYTpyLCoe/bUJ29YYvMINTeHTd//hLQh0ZAyMGY1opDm1tqaXX0qpYmWG60KcvN4fCR0i6lw==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.17.3.tgz", + "integrity": "sha512-ozgeuSioX9z2wtlargfgdw3LKwDFAfm8gxu+xwNREvXiLsevb+lb7ZlY5/ay+MahqR5Hfs7XzYzBLTKL/ldn9g==", + "license": "MIT", "engines": { "node": ">=18" } @@ -127,200 +133,239 @@ "node_modules/@cspell/dict-ada": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-ada/-/dict-ada-4.1.0.tgz", - "integrity": "sha512-7SvmhmX170gyPd+uHXrfmqJBY5qLcCX8kTGURPVeGxmt8XNXT75uu9rnZO+jwrfuU2EimNoArdVy5GZRGljGNg==" + "integrity": "sha512-7SvmhmX170gyPd+uHXrfmqJBY5qLcCX8kTGURPVeGxmt8XNXT75uu9rnZO+jwrfuU2EimNoArdVy5GZRGljGNg==", + "license": "MIT" }, "node_modules/@cspell/dict-al": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-al/-/dict-al-1.1.0.tgz", - "integrity": "sha512-PtNI1KLmYkELYltbzuoztBxfi11jcE9HXBHCpID2lou/J4VMYKJPNqe4ZjVzSI9NYbMnMnyG3gkbhIdx66VSXg==" + "integrity": "sha512-PtNI1KLmYkELYltbzuoztBxfi11jcE9HXBHCpID2lou/J4VMYKJPNqe4ZjVzSI9NYbMnMnyG3gkbhIdx66VSXg==", + "license": "MIT" }, "node_modules/@cspell/dict-aws": { "version": "4.0.9", "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.9.tgz", - "integrity": "sha512-bDYdnnJGwSkIZ4gzrauu7qzOs/ZAY/FnU4k11LgdMI8BhwMfsbsy2EI1iS+sD/BI5ZnNT9kU5YR3WADeNOmhRg==" + "integrity": "sha512-bDYdnnJGwSkIZ4gzrauu7qzOs/ZAY/FnU4k11LgdMI8BhwMfsbsy2EI1iS+sD/BI5ZnNT9kU5YR3WADeNOmhRg==", + "license": "MIT" }, "node_modules/@cspell/dict-bash": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.2.0.tgz", "integrity": "sha512-HOyOS+4AbCArZHs/wMxX/apRkjxg6NDWdt0jF9i9XkvJQUltMwEhyA2TWYjQ0kssBsnof+9amax2lhiZnh3kCg==", + "license": "MIT", "dependencies": { "@cspell/dict-shell": "1.1.0" } }, "node_modules/@cspell/dict-companies": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.1.12.tgz", - "integrity": "sha512-99FxBNdLOQc3nVQ663Xh7JqDLbIy/AdqOecQ5bk3HpmXpSkoDvTT7XCUU5nQZvmFBrrQlXFKlRRYjLfTEOUDdA==" + "version": "3.1.13", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.1.13.tgz", + "integrity": "sha512-EAaFMxnSG4eQKup9D81EnWAYIzorLWG7b7Zzf+Suu0bVeFBpCYESss/EWtnmb5ZZNfKAGxtoMqfL3vRfyJERIQ==", + "license": "MIT" }, "node_modules/@cspell/dict-cpp": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-6.0.3.tgz", - "integrity": "sha512-OFrVXdxCeGKnon36Pe3yFjBuY4kzzEwWFf3vDz+cJTodZDkjFkBifQeTtt5YfimgF8cfAJZXkBCsxjipAgmAiw==" + "integrity": "sha512-OFrVXdxCeGKnon36Pe3yFjBuY4kzzEwWFf3vDz+cJTodZDkjFkBifQeTtt5YfimgF8cfAJZXkBCsxjipAgmAiw==", + "license": "MIT" }, "node_modules/@cspell/dict-cryptocurrencies": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-5.0.4.tgz", - "integrity": "sha512-6iFu7Abu+4Mgqq08YhTKHfH59mpMpGTwdzDB2Y8bbgiwnGFCeoiSkVkgLn1Kel2++hYcZ8vsAW/MJS9oXxuMag==" + "integrity": "sha512-6iFu7Abu+4Mgqq08YhTKHfH59mpMpGTwdzDB2Y8bbgiwnGFCeoiSkVkgLn1Kel2++hYcZ8vsAW/MJS9oXxuMag==", + "license": "MIT" }, "node_modules/@cspell/dict-csharp": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@cspell/dict-csharp/-/dict-csharp-4.0.6.tgz", - "integrity": "sha512-w/+YsqOknjQXmIlWDRmkW+BHBPJZ/XDrfJhZRQnp0wzpPOGml7W0q1iae65P2AFRtTdPKYmvSz7AL5ZRkCnSIw==" + "integrity": "sha512-w/+YsqOknjQXmIlWDRmkW+BHBPJZ/XDrfJhZRQnp0wzpPOGml7W0q1iae65P2AFRtTdPKYmvSz7AL5ZRkCnSIw==", + "license": "MIT" }, "node_modules/@cspell/dict-css": { "version": "4.0.17", "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.17.tgz", - "integrity": "sha512-2EisRLHk6X/PdicybwlajLGKF5aJf4xnX2uuG5lexuYKt05xV/J/OiBADmi8q9obhxf1nesrMQbqAt+6CsHo/w==" + "integrity": "sha512-2EisRLHk6X/PdicybwlajLGKF5aJf4xnX2uuG5lexuYKt05xV/J/OiBADmi8q9obhxf1nesrMQbqAt+6CsHo/w==", + "license": "MIT" }, "node_modules/@cspell/dict-dart": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@cspell/dict-dart/-/dict-dart-2.3.0.tgz", - "integrity": "sha512-1aY90lAicek8vYczGPDKr70pQSTQHwMFLbmWKTAI6iavmb1fisJBS1oTmMOKE4ximDf86MvVN6Ucwx3u/8HqLg==" + "integrity": "sha512-1aY90lAicek8vYczGPDKr70pQSTQHwMFLbmWKTAI6iavmb1fisJBS1oTmMOKE4ximDf86MvVN6Ucwx3u/8HqLg==", + "license": "MIT" }, "node_modules/@cspell/dict-data-science": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.6.tgz", - "integrity": "sha512-gOYKZOg358yhnnQfr1/f232REmjeIymXUHJdrLEMPirluv2rzMWvEBBazqRVQ++jMUNg9IduVI0v096ZWMDekA==" + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-2.0.7.tgz", + "integrity": "sha512-XhAkK+nSW6zmrnWzusmZ1BpYLc62AWYHZc2p17u4nE2Z9XG5DleG55PCZxXQTKz90pmwlhFM9AfpkJsYaBWATA==", + "license": "MIT" }, "node_modules/@cspell/dict-django": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.1.4.tgz", - "integrity": "sha512-fX38eUoPvytZ/2GA+g4bbdUtCMGNFSLbdJJPKX2vbewIQGfgSFJKY56vvcHJKAvw7FopjvgyS/98Ta9WN1gckg==" + "integrity": "sha512-fX38eUoPvytZ/2GA+g4bbdUtCMGNFSLbdJJPKX2vbewIQGfgSFJKY56vvcHJKAvw7FopjvgyS/98Ta9WN1gckg==", + "license": "MIT" }, "node_modules/@cspell/dict-docker": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/@cspell/dict-docker/-/dict-docker-1.1.12.tgz", - "integrity": "sha512-6d25ZPBnYZaT9D9An/x6g/4mk542R8bR3ipnby3QFCxnfdd6xaWiTcwDPsCgwN2aQZIQ1jX/fil9KmBEqIK/qA==" + "integrity": "sha512-6d25ZPBnYZaT9D9An/x6g/4mk542R8bR3ipnby3QFCxnfdd6xaWiTcwDPsCgwN2aQZIQ1jX/fil9KmBEqIK/qA==", + "license": "MIT" }, "node_modules/@cspell/dict-dotnet": { "version": "5.0.9", "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.9.tgz", - "integrity": "sha512-JGD6RJW5sHtO5lfiJl11a5DpPN6eKSz5M1YBa1I76j4dDOIqgZB6rQexlDlK1DH9B06X4GdDQwdBfnpAB0r2uQ==" + "integrity": "sha512-JGD6RJW5sHtO5lfiJl11a5DpPN6eKSz5M1YBa1I76j4dDOIqgZB6rQexlDlK1DH9B06X4GdDQwdBfnpAB0r2uQ==", + "license": "MIT" }, "node_modules/@cspell/dict-elixir": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@cspell/dict-elixir/-/dict-elixir-4.0.7.tgz", - "integrity": "sha512-MAUqlMw73mgtSdxvbAvyRlvc3bYnrDqXQrx5K9SwW8F7fRYf9V4vWYFULh+UWwwkqkhX9w03ZqFYRTdkFku6uA==" + "integrity": "sha512-MAUqlMw73mgtSdxvbAvyRlvc3bYnrDqXQrx5K9SwW8F7fRYf9V4vWYFULh+UWwwkqkhX9w03ZqFYRTdkFku6uA==", + "license": "MIT" }, "node_modules/@cspell/dict-en_us": { - "version": "4.3.29", - "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.29.tgz", - "integrity": "sha512-7kHP0sJ271oS5RqakxvhWvHFoCUFCBDV6+cgIRIpKwW0aYVB4F2AwElGsdeE/XEmihhYUje7e/e6X3IEWHrcrQ==" + "version": "4.3.30", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.30.tgz", + "integrity": "sha512-p0G5fByj5fUnMyFUlkN3kaqE3nuQkqpYV47Gn9n8k2TszsdLY55xj9UoFE4YIcjOiyU1bR/YDJ5daiPMYXTJ/A==", + "license": "MIT" }, "node_modules/@cspell/dict-en-common-misspellings": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.0.8.tgz", - "integrity": "sha512-l1u/pDjwrPyWwBd1hCkZhdsK8yLbLFPD2xWz+1tFFI7WaV9ckDZoF3woRc/0wFGRy53yrfSAVuwhoYOQnHe/fA==" + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.0.9.tgz", + "integrity": "sha512-O/jAr1VNtuyCFckbTmpeEf43ZFWVD9cJFvWaA6rO2IVmLirJViHWJUyBZOuQcesSplzEIw80MAYmnK06/MDWXQ==", + "license": "CC BY-SA 4.0" }, "node_modules/@cspell/dict-en-gb": { "version": "1.1.33", "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz", - "integrity": "sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==" + "integrity": "sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==", + "license": "MIT" }, "node_modules/@cspell/dict-filetypes": { "version": "3.0.10", "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.10.tgz", - "integrity": "sha512-JEN3627joBVtpa1yfkdN9vz1Z129PoKGHBKjXCEziJvf2Zt1LeULWYYYg/O6pzRR4yzRa5YbXDTuyrN7vX7DFg==" + "integrity": "sha512-JEN3627joBVtpa1yfkdN9vz1Z129PoKGHBKjXCEziJvf2Zt1LeULWYYYg/O6pzRR4yzRa5YbXDTuyrN7vX7DFg==", + "license": "MIT" }, "node_modules/@cspell/dict-flutter": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-flutter/-/dict-flutter-1.1.0.tgz", - "integrity": "sha512-3zDeS7zc2p8tr9YH9tfbOEYfopKY/srNsAa+kE3rfBTtQERAZeOhe5yxrnTPoufctXLyuUtcGMUTpxr3dO0iaA==" + "integrity": "sha512-3zDeS7zc2p8tr9YH9tfbOEYfopKY/srNsAa+kE3rfBTtQERAZeOhe5yxrnTPoufctXLyuUtcGMUTpxr3dO0iaA==", + "license": "MIT" }, "node_modules/@cspell/dict-fonts": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-fonts/-/dict-fonts-4.0.4.tgz", - "integrity": "sha512-cHFho4hjojBcHl6qxidl9CvUb492IuSk7xIf2G2wJzcHwGaCFa2o3gRcxmIg1j62guetAeDDFELizDaJlVRIOg==" + "integrity": "sha512-cHFho4hjojBcHl6qxidl9CvUb492IuSk7xIf2G2wJzcHwGaCFa2o3gRcxmIg1j62guetAeDDFELizDaJlVRIOg==", + "license": "MIT" }, "node_modules/@cspell/dict-fsharp": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-fsharp/-/dict-fsharp-1.1.0.tgz", - "integrity": "sha512-oguWmHhGzgbgbEIBKtgKPrFSVAFtvGHaQS0oj+vacZqMObwkapcTGu7iwf4V3Bc2T3caf0QE6f6rQfIJFIAVsw==" + "integrity": "sha512-oguWmHhGzgbgbEIBKtgKPrFSVAFtvGHaQS0oj+vacZqMObwkapcTGu7iwf4V3Bc2T3caf0QE6f6rQfIJFIAVsw==", + "license": "MIT" }, "node_modules/@cspell/dict-fullstack": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-3.2.3.tgz", - "integrity": "sha512-62PbndIyQPH11mAv0PyiyT0vbwD0AXEocPpHlCHzfb5v9SspzCCbzQ/LIBiFmyRa+q5LMW35CnSVu6OXdT+LKg==" + "integrity": "sha512-62PbndIyQPH11mAv0PyiyT0vbwD0AXEocPpHlCHzfb5v9SspzCCbzQ/LIBiFmyRa+q5LMW35CnSVu6OXdT+LKg==", + "license": "MIT" }, "node_modules/@cspell/dict-gaming-terms": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.1.0.tgz", - "integrity": "sha512-46AnDs9XkgJ2f1Sqol1WgfJ8gOqp60fojpc9Wxch7x+BA63g4JfMV5/M5x0sI0TLlLY8EBSglcr8wQF/7C80AQ==" + "integrity": "sha512-46AnDs9XkgJ2f1Sqol1WgfJ8gOqp60fojpc9Wxch7x+BA63g4JfMV5/M5x0sI0TLlLY8EBSglcr8wQF/7C80AQ==", + "license": "MIT" }, "node_modules/@cspell/dict-git": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-3.0.4.tgz", - "integrity": "sha512-C44M+m56rYn6QCsLbiKiedyPTMZxlDdEYAsPwwlL5bhMDDzXZ3Ic8OCQIhMbiunhCOJJT+er4URmOmM+sllnjg==" + "integrity": "sha512-C44M+m56rYn6QCsLbiKiedyPTMZxlDdEYAsPwwlL5bhMDDzXZ3Ic8OCQIhMbiunhCOJJT+er4URmOmM+sllnjg==", + "license": "MIT" }, "node_modules/@cspell/dict-golang": { "version": "6.0.18", "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.18.tgz", - "integrity": "sha512-Mt+7NwfodDwUk7423DdaQa0YaA+4UoV3XSxQwZioqjpFBCuxfvvv4l80MxCTAAbK6duGj0uHbGTwpv8fyKYPKg==" + "integrity": "sha512-Mt+7NwfodDwUk7423DdaQa0YaA+4UoV3XSxQwZioqjpFBCuxfvvv4l80MxCTAAbK6duGj0uHbGTwpv8fyKYPKg==", + "license": "MIT" }, "node_modules/@cspell/dict-google": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@cspell/dict-google/-/dict-google-1.0.5.tgz", - "integrity": "sha512-KNrzfUsoFat94slWzo36g601sIGz6KtE4kBMM0gpqwFLK/MXRyaW65IL4SwysY0PEhuRzg9spLLMnUXuVcY2hQ==" + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@cspell/dict-google/-/dict-google-1.0.8.tgz", + "integrity": "sha512-BnMHgcEeaLyloPmBs8phCqprI+4r2Jb8rni011A8hE+7FNk7FmLE3kiwxLFrcZnnb7eqM0agW4zUaNoB0P+z8A==", + "license": "MIT" }, "node_modules/@cspell/dict-haskell": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-haskell/-/dict-haskell-4.0.5.tgz", - "integrity": "sha512-s4BG/4tlj2pPM9Ha7IZYMhUujXDnI0Eq1+38UTTCpatYLbQqDwRFf2KNPLRqkroU+a44yTUAe0rkkKbwy4yRtQ==" + "integrity": "sha512-s4BG/4tlj2pPM9Ha7IZYMhUujXDnI0Eq1+38UTTCpatYLbQqDwRFf2KNPLRqkroU+a44yTUAe0rkkKbwy4yRtQ==", + "license": "MIT" }, "node_modules/@cspell/dict-html": { "version": "4.0.11", "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.11.tgz", - "integrity": "sha512-QR3b/PB972SRQ2xICR1Nw/M44IJ6rjypwzA4jn+GH8ydjAX9acFNfc+hLZVyNe0FqsE90Gw3evLCOIF0vy1vQw==" + "integrity": "sha512-QR3b/PB972SRQ2xICR1Nw/M44IJ6rjypwzA4jn+GH8ydjAX9acFNfc+hLZVyNe0FqsE90Gw3evLCOIF0vy1vQw==", + "license": "MIT" }, "node_modules/@cspell/dict-html-symbol-entities": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.3.tgz", - "integrity": "sha512-aABXX7dMLNFdSE8aY844X4+hvfK7977sOWgZXo4MTGAmOzR8524fjbJPswIBK7GaD3+SgFZ2yP2o0CFvXDGF+A==" + "integrity": "sha512-aABXX7dMLNFdSE8aY844X4+hvfK7977sOWgZXo4MTGAmOzR8524fjbJPswIBK7GaD3+SgFZ2yP2o0CFvXDGF+A==", + "license": "MIT" }, "node_modules/@cspell/dict-java": { "version": "5.0.11", "resolved": "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-5.0.11.tgz", - "integrity": "sha512-T4t/1JqeH33Raa/QK/eQe26FE17eUCtWu+JsYcTLkQTci2dk1DfcIKo8YVHvZXBnuM43ATns9Xs0s+AlqDeH7w==" + "integrity": "sha512-T4t/1JqeH33Raa/QK/eQe26FE17eUCtWu+JsYcTLkQTci2dk1DfcIKo8YVHvZXBnuM43ATns9Xs0s+AlqDeH7w==", + "license": "MIT" }, "node_modules/@cspell/dict-julia": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-julia/-/dict-julia-1.1.0.tgz", - "integrity": "sha512-CPUiesiXwy3HRoBR3joUseTZ9giFPCydSKu2rkh6I2nVjXnl5vFHzOMLXpbF4HQ1tH2CNfnDbUndxD+I+7eL9w==" + "integrity": "sha512-CPUiesiXwy3HRoBR3joUseTZ9giFPCydSKu2rkh6I2nVjXnl5vFHzOMLXpbF4HQ1tH2CNfnDbUndxD+I+7eL9w==", + "license": "MIT" }, "node_modules/@cspell/dict-k8s": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.10.tgz", - "integrity": "sha512-313haTrX9prep1yWO7N6Xw4D6tvUJ0Xsx+YhCP+5YrrcIKoEw5Rtlg8R4PPzLqe6zibw6aJ+Eqq+y76Vx5BZkw==" + "integrity": "sha512-313haTrX9prep1yWO7N6Xw4D6tvUJ0Xsx+YhCP+5YrrcIKoEw5Rtlg8R4PPzLqe6zibw6aJ+Eqq+y76Vx5BZkw==", + "license": "MIT" }, "node_modules/@cspell/dict-kotlin": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-kotlin/-/dict-kotlin-1.1.0.tgz", - "integrity": "sha512-vySaVw6atY7LdwvstQowSbdxjXG6jDhjkWVWSjg1XsUckyzH1JRHXe9VahZz1i7dpoFEUOWQrhIe5B9482UyJQ==" + "integrity": "sha512-vySaVw6atY7LdwvstQowSbdxjXG6jDhjkWVWSjg1XsUckyzH1JRHXe9VahZz1i7dpoFEUOWQrhIe5B9482UyJQ==", + "license": "MIT" }, "node_modules/@cspell/dict-latex": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/@cspell/dict-latex/-/dict-latex-4.0.3.tgz", - "integrity": "sha512-2KXBt9fSpymYHxHfvhUpjUFyzrmN4c4P8mwIzweLyvqntBT3k0YGZJSriOdjfUjwSygrfEwiuPI1EMrvgrOMJw==" + "integrity": "sha512-2KXBt9fSpymYHxHfvhUpjUFyzrmN4c4P8mwIzweLyvqntBT3k0YGZJSriOdjfUjwSygrfEwiuPI1EMrvgrOMJw==", + "license": "MIT" }, "node_modules/@cspell/dict-lorem-ipsum": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-4.0.4.tgz", - "integrity": "sha512-+4f7vtY4dp2b9N5fn0za/UR0kwFq2zDtA62JCbWHbpjvO9wukkbl4rZg4YudHbBgkl73HRnXFgCiwNhdIA1JPw==" + "integrity": "sha512-+4f7vtY4dp2b9N5fn0za/UR0kwFq2zDtA62JCbWHbpjvO9wukkbl4rZg4YudHbBgkl73HRnXFgCiwNhdIA1JPw==", + "license": "MIT" }, "node_modules/@cspell/dict-lua": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.7.tgz", - "integrity": "sha512-Wbr7YSQw+cLHhTYTKV6cAljgMgcY+EUAxVIZW3ljKswEe4OLxnVJ7lPqZF5JKjlXdgCjbPSimsHqyAbC5pQN/Q==" + "integrity": "sha512-Wbr7YSQw+cLHhTYTKV6cAljgMgcY+EUAxVIZW3ljKswEe4OLxnVJ7lPqZF5JKjlXdgCjbPSimsHqyAbC5pQN/Q==", + "license": "MIT" }, "node_modules/@cspell/dict-makefile": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-makefile/-/dict-makefile-1.0.4.tgz", - "integrity": "sha512-E4hG/c0ekPqUBvlkrVvzSoAA+SsDA9bLi4xSV3AXHTVru7Y2bVVGMPtpfF+fI3zTkww/jwinprcU1LSohI3ylw==" + "integrity": "sha512-E4hG/c0ekPqUBvlkrVvzSoAA+SsDA9bLi4xSV3AXHTVru7Y2bVVGMPtpfF+fI3zTkww/jwinprcU1LSohI3ylw==", + "license": "MIT" }, "node_modules/@cspell/dict-markdown": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/@cspell/dict-markdown/-/dict-markdown-2.0.9.tgz", "integrity": "sha512-j2e6Eg18BlTb1mMP1DkyRFMM/FLS7qiZjltpURzDckB57zDZbUyskOFdl4VX7jItZZEeY0fe22bSPOycgS1Z5A==", + "license": "MIT", "peerDependencies": { "@cspell/dict-css": "^4.0.17", "@cspell/dict-html": "^4.0.11", @@ -331,107 +376,127 @@ "node_modules/@cspell/dict-monkeyc": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@cspell/dict-monkeyc/-/dict-monkeyc-1.0.10.tgz", - "integrity": "sha512-7RTGyKsTIIVqzbvOtAu6Z/lwwxjGRtY5RkKPlXKHEoEAgIXwfDxb5EkVwzGQwQr8hF/D3HrdYbRT8MFBfsueZw==" + "integrity": "sha512-7RTGyKsTIIVqzbvOtAu6Z/lwwxjGRtY5RkKPlXKHEoEAgIXwfDxb5EkVwzGQwQr8hF/D3HrdYbRT8MFBfsueZw==", + "license": "MIT" }, "node_modules/@cspell/dict-node": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-5.0.6.tgz", - "integrity": "sha512-CEbhPCpxGvRNByGolSBTrXXW2rJA4bGqZuTx1KKO85mwR6aadeOmUE7xf/8jiCkXSy+qvr9aJeh+jlfXcsrziQ==" + "integrity": "sha512-CEbhPCpxGvRNByGolSBTrXXW2rJA4bGqZuTx1KKO85mwR6aadeOmUE7xf/8jiCkXSy+qvr9aJeh+jlfXcsrziQ==", + "license": "MIT" }, "node_modules/@cspell/dict-npm": { - "version": "5.1.23", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.1.23.tgz", - "integrity": "sha512-/xK7G1/H5M73J3CAb3WmVXlMbK6zjZrfwmOOBiB7SSbK6h7/WmwRBuLC0UwO50x07NJUuVmJek5ELaNa81guVw==" + "version": "5.1.24", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.1.24.tgz", + "integrity": "sha512-yAyyHetElLR236sqWQkBtiLbzCGexV5zzLMHyQPptKQQK88BTQR5f9wXW2EtSgJw/4gUchpSWQWxMlkIfK/iQQ==", + "license": "MIT" }, "node_modules/@cspell/dict-php": { "version": "4.0.14", "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.14.tgz", - "integrity": "sha512-7zur8pyncYZglxNmqsRycOZ6inpDoVd4yFfz1pQRe5xaRWMiK3Km4n0/X/1YMWhh3e3Sl/fQg5Axb2hlN68t1g==" + "integrity": "sha512-7zur8pyncYZglxNmqsRycOZ6inpDoVd4yFfz1pQRe5xaRWMiK3Km4n0/X/1YMWhh3e3Sl/fQg5Axb2hlN68t1g==", + "license": "MIT" }, "node_modules/@cspell/dict-powershell": { "version": "5.0.14", "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.14.tgz", - "integrity": "sha512-ktjjvtkIUIYmj/SoGBYbr3/+CsRGNXGpvVANrY0wlm/IoGlGywhoTUDYN0IsGwI2b8Vktx3DZmQkfb3Wo38jBA==" + "integrity": "sha512-ktjjvtkIUIYmj/SoGBYbr3/+CsRGNXGpvVANrY0wlm/IoGlGywhoTUDYN0IsGwI2b8Vktx3DZmQkfb3Wo38jBA==", + "license": "MIT" }, "node_modules/@cspell/dict-public-licenses": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.13.tgz", - "integrity": "sha512-1Wdp/XH1ieim7CadXYE7YLnUlW0pULEjVl9WEeziZw3EKCAw8ZI8Ih44m4bEa5VNBLnuP5TfqC4iDautAleQzQ==" + "integrity": "sha512-1Wdp/XH1ieim7CadXYE7YLnUlW0pULEjVl9WEeziZw3EKCAw8ZI8Ih44m4bEa5VNBLnuP5TfqC4iDautAleQzQ==", + "license": "MIT" }, "node_modules/@cspell/dict-python": { - "version": "4.2.14", - "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.14.tgz", - "integrity": "sha512-NZ/rsTH5gqTlEwbSg0vn5b1TsyzrUvA6ykwCVCwsVDdlQAS82cyDsF9JqHp8S4d6PFykmkfSxtAXYyOUr0KCbg==", + "version": "4.2.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.2.15.tgz", + "integrity": "sha512-VNXhj0Eh+hdHN89MgyaoSAexBQKmYtJaMhucbMI7XmBs4pf8fuFFN3xugk51/A4TZJr8+RImdFFsGMOw+I4bDA==", + "license": "MIT", "dependencies": { - "@cspell/dict-data-science": "^2.0.6" + "@cspell/dict-data-science": "^2.0.7" } }, "node_modules/@cspell/dict-r": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-r/-/dict-r-2.1.0.tgz", - "integrity": "sha512-k2512wgGG0lTpTYH9w5Wwco+lAMf3Vz7mhqV8+OnalIE7muA0RSuD9tWBjiqLcX8zPvEJr4LdgxVju8Gk3OKyA==" + "integrity": "sha512-k2512wgGG0lTpTYH9w5Wwco+lAMf3Vz7mhqV8+OnalIE7muA0RSuD9tWBjiqLcX8zPvEJr4LdgxVju8Gk3OKyA==", + "license": "MIT" }, "node_modules/@cspell/dict-ruby": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.7.tgz", - "integrity": "sha512-4/d0hcoPzi5Alk0FmcyqlzFW9lQnZh9j07MJzPcyVO62nYJJAGKaPZL2o4qHeCS/od/ctJC5AHRdoUm0ktsw6Q==" + "integrity": "sha512-4/d0hcoPzi5Alk0FmcyqlzFW9lQnZh9j07MJzPcyVO62nYJJAGKaPZL2o4qHeCS/od/ctJC5AHRdoUm0ktsw6Q==", + "license": "MIT" }, "node_modules/@cspell/dict-rust": { "version": "4.0.11", "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.11.tgz", - "integrity": "sha512-OGWDEEzm8HlkSmtD8fV3pEcO2XBpzG2XYjgMCJCRwb2gRKvR+XIm6Dlhs04N/K2kU+iH8bvrqNpM8fS/BFl0uw==" + "integrity": "sha512-OGWDEEzm8HlkSmtD8fV3pEcO2XBpzG2XYjgMCJCRwb2gRKvR+XIm6Dlhs04N/K2kU+iH8bvrqNpM8fS/BFl0uw==", + "license": "MIT" }, "node_modules/@cspell/dict-scala": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.7.tgz", - "integrity": "sha512-yatpSDW/GwulzO3t7hB5peoWwzo+Y3qTc0pO24Jf6f88jsEeKmDeKkfgPbYuCgbE4jisGR4vs4+jfQZDIYmXPA==" + "integrity": "sha512-yatpSDW/GwulzO3t7hB5peoWwzo+Y3qTc0pO24Jf6f88jsEeKmDeKkfgPbYuCgbE4jisGR4vs4+jfQZDIYmXPA==", + "license": "MIT" }, "node_modules/@cspell/dict-shell": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-shell/-/dict-shell-1.1.0.tgz", - "integrity": "sha512-D/xHXX7T37BJxNRf5JJHsvziFDvh23IF/KvkZXNSh8VqcRdod3BAz9VGHZf6VDqcZXr1VRqIYR3mQ8DSvs3AVQ==" + "integrity": "sha512-D/xHXX7T37BJxNRf5JJHsvziFDvh23IF/KvkZXNSh8VqcRdod3BAz9VGHZf6VDqcZXr1VRqIYR3mQ8DSvs3AVQ==", + "license": "MIT" }, "node_modules/@cspell/dict-software-terms": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-4.2.2.tgz", - "integrity": "sha512-cgteXRzx2W/Ug7QSdFJrVxLES7krrZEjZ9J6sXRWOsVYFpgu2Gup8NKmjKOZ8NTnCjHQFrMnbmKdv56q9Kwixw==" + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-4.2.4.tgz", + "integrity": "sha512-GRkuaFfjFHPYynyRMuisKyE3gRiVK0REClRWfnH9+5iCs5TKDURsMpWJGNsgQ6N5jAKKrtWXVKjepkDHjMldjQ==", + "license": "MIT" }, "node_modules/@cspell/dict-sql": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.2.0.tgz", - "integrity": "sha512-MUop+d1AHSzXpBvQgQkCiok8Ejzb+nrzyG16E8TvKL2MQeDwnIvMe3bv90eukP6E1HWb+V/MA/4pnq0pcJWKqQ==" + "integrity": "sha512-MUop+d1AHSzXpBvQgQkCiok8Ejzb+nrzyG16E8TvKL2MQeDwnIvMe3bv90eukP6E1HWb+V/MA/4pnq0pcJWKqQ==", + "license": "MIT" }, "node_modules/@cspell/dict-svelte": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@cspell/dict-svelte/-/dict-svelte-1.0.6.tgz", - "integrity": "sha512-8LAJHSBdwHCoKCSy72PXXzz7ulGROD0rP1CQ0StOqXOOlTUeSFaJJlxNYjlONgd2c62XBQiN2wgLhtPN+1Zv7Q==" + "integrity": "sha512-8LAJHSBdwHCoKCSy72PXXzz7ulGROD0rP1CQ0StOqXOOlTUeSFaJJlxNYjlONgd2c62XBQiN2wgLhtPN+1Zv7Q==", + "license": "MIT" }, "node_modules/@cspell/dict-swift": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@cspell/dict-swift/-/dict-swift-2.0.5.tgz", - "integrity": "sha512-3lGzDCwUmnrfckv3Q4eVSW3sK3cHqqHlPprFJZD4nAqt23ot7fic5ALR7J4joHpvDz36nHX34TgcbZNNZOC/JA==" + "integrity": "sha512-3lGzDCwUmnrfckv3Q4eVSW3sK3cHqqHlPprFJZD4nAqt23ot7fic5ALR7J4joHpvDz36nHX34TgcbZNNZOC/JA==", + "license": "MIT" }, "node_modules/@cspell/dict-terraform": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@cspell/dict-terraform/-/dict-terraform-1.1.0.tgz", - "integrity": "sha512-G55pcUUxeXAhejstmD35B47SkFd4uqCQimc+CMgq8Nx0dr03guL2iMsz8faRWQGkCnGimX8S91rbOhDv9p/heg==" + "integrity": "sha512-G55pcUUxeXAhejstmD35B47SkFd4uqCQimc+CMgq8Nx0dr03guL2iMsz8faRWQGkCnGimX8S91rbOhDv9p/heg==", + "license": "MIT" }, "node_modules/@cspell/dict-typescript": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.2.0.tgz", - "integrity": "sha512-Pk3zNePLT8qg51l0M4g1ISowYAEGxTuNfZlgkU5SvHa9Cu7x/BWoyYq9Fvc3kAyoisCjRPyvWF4uRYrPitPDFw==" + "integrity": "sha512-Pk3zNePLT8qg51l0M4g1ISowYAEGxTuNfZlgkU5SvHa9Cu7x/BWoyYq9Fvc3kAyoisCjRPyvWF4uRYrPitPDFw==", + "license": "MIT" }, "node_modules/@cspell/dict-vue": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@cspell/dict-vue/-/dict-vue-3.0.4.tgz", - "integrity": "sha512-0dPtI0lwHcAgSiQFx8CzvqjdoXROcH+1LyqgROCpBgppommWpVhbQ0eubnKotFEXgpUCONVkeZJ6Ql8NbTEu+w==" + "integrity": "sha512-0dPtI0lwHcAgSiQFx8CzvqjdoXROcH+1LyqgROCpBgppommWpVhbQ0eubnKotFEXgpUCONVkeZJ6Ql8NbTEu+w==", + "license": "MIT" }, "node_modules/@cspell/dynamic-import": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.17.2.tgz", - "integrity": "sha512-n3AVbyBlTn/pLtYK62mqgDfJIuQHUTY/k8SMUCjyjfgoqd3LcKhS1PmbLfDWPMTODK30cSMMTLejjy2bL6ksEw==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.17.3.tgz", + "integrity": "sha512-Kg6IJhGHPv+9OxpxaXUpcqgnHEOhMLRWHLyx7FADZ+CJyO4AVeWQfhpTRM6KXhzIl7dPlLG1g8JAQxaoy88KTw==", + "license": "MIT", "dependencies": { - "@cspell/url": "8.17.2", + "@cspell/url": "8.17.3", "import-meta-resolve": "^4.1.0" }, "engines": { @@ -439,25 +504,28 @@ } }, "node_modules/@cspell/filetypes": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-8.17.2.tgz", - "integrity": "sha512-2B+dB4Ls2xiOjg+vEEbAuJTHtMfXSihVzfLGnj9+qUfq47iqrz4ZBvCOfZhYdiVaaZJoZUgIw8ljrUfqFzYDAg==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/filetypes/-/filetypes-8.17.3.tgz", + "integrity": "sha512-UFqRmJPccOSo+RYP/jZ4cr0s7ni37GrvnNAg1H/qIIxfmBYsexTAmsNzMqxp1M31NeI1Cx3LL7PspPMT0ms+7w==", + "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@cspell/strong-weak-map": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.17.2.tgz", - "integrity": "sha512-LbbhdVwtqyJ71X+O7e2PqpDp7zLiY8jmW2CJFLjZYWTUawgav2bpwECGq6O9Gnwqe+fj7yWxGJFDSpXQcCJQAw==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.17.3.tgz", + "integrity": "sha512-l/CaFc3CITI/dC+whEBZ05Om0KXR3V2whhVOWOBPIqA5lCjWAyvWWvmFD+CxWd0Hs6Qcb/YDnMyJW14aioXN4g==", + "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@cspell/url": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/@cspell/url/-/url-8.17.2.tgz", - "integrity": "sha512-yy4eYWNX2iutXmy4Igbn/hL/NYaNt94DylohPtgVr0Zxnn/AAArt9Bv1KXPpjB8VFy2wzzPzWmZ+MWDUVpHCbg==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/@cspell/url/-/url-8.17.3.tgz", + "integrity": "sha512-gcsCz8g0qY94C8RXiAlUH/89n84Q9RSptP91XrvnLOT+Xva9Aibd7ywd5k9ameuf8Nagyl0ezB1MInZ30S9SRw==", + "license": "MIT", "engines": { "node": ">=18.0" } @@ -465,12 +533,14 @@ "node_modules/array-timsort": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", - "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==" + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", + "license": "MIT" }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", "dependencies": { "fill-range": "^7.1.1" }, @@ -482,6 +552,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "license": "MIT", "engines": { "node": ">=6" } @@ -516,6 +587,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.2.tgz", "integrity": "sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==", + "license": "MIT", "dependencies": { "parent-module": "^2.0.0", "resolve-from": "^5.0.0" @@ -528,9 +600,10 @@ } }, "node_modules/commander": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-13.0.0.tgz", - "integrity": "sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "license": "MIT", "engines": { "node": ">=18" } @@ -539,6 +612,7 @@ "version": "4.2.5", "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.5.tgz", "integrity": "sha512-bKw/r35jR3HGt5PEPm1ljsQQGyCrR8sFGNiN5L+ykDHdpO8Smxkrkla9Yi6NkQyUrb8V54PGhfMs6NrIwtxtdw==", + "license": "MIT", "dependencies": { "array-timsort": "^1.0.3", "core-util-is": "^1.0.3", @@ -553,26 +627,28 @@ "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "license": "MIT" }, "node_modules/cspell": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell/-/cspell-8.17.2.tgz", - "integrity": "sha512-y+INkxDa+M9f+gsyyMLjKh1tF20r2g5Gn22peSRJglrNLQtmDuRtDT9vyDHANXZcH5g6pHDnENQu/+P2Tiyu8Q==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-8.17.3.tgz", + "integrity": "sha512-fBZg674Dir9y/FWMwm2JyixM/1eB2vnqHJjRxOgGS/ZiZ3QdQ3LkK02Aqvlni8ffWYDZnYnYY9rfWmql9bb42w==", + "license": "MIT", "dependencies": { - "@cspell/cspell-json-reporter": "8.17.2", - "@cspell/cspell-pipe": "8.17.2", - "@cspell/cspell-types": "8.17.2", - "@cspell/dynamic-import": "8.17.2", - "@cspell/url": "8.17.2", + "@cspell/cspell-json-reporter": "8.17.3", + "@cspell/cspell-pipe": "8.17.3", + "@cspell/cspell-types": "8.17.3", + "@cspell/dynamic-import": "8.17.3", + "@cspell/url": "8.17.3", "chalk": "^5.4.1", "chalk-template": "^1.1.0", - "commander": "^13.0.0", - "cspell-dictionary": "8.17.2", - "cspell-gitignore": "8.17.2", - "cspell-glob": "8.17.2", - "cspell-io": "8.17.2", - "cspell-lib": "8.17.2", + "commander": "^13.1.0", + "cspell-dictionary": "8.17.3", + "cspell-gitignore": "8.17.3", + "cspell-glob": "8.17.3", + "cspell-io": "8.17.3", + "cspell-lib": "8.17.3", "fast-json-stable-stringify": "^2.1.0", "file-entry-cache": "^9.1.0", "get-stdin": "^9.0.0", @@ -591,11 +667,12 @@ } }, "node_modules/cspell-config-lib": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.17.2.tgz", - "integrity": "sha512-g08lRd/smLk2je0j7HlCjdDa0dSTyI2oRP3gScWlsyXjb4NSr9qO0Wzyn5BfPgrqFdS/z4dXbHe+tnLQZCt9iQ==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.17.3.tgz", + "integrity": "sha512-+N32Q6xck3D2RqZIFwq8s0TnzHYMpyh4bgNtYqW5DIP3TLDiA4/MJGjwmLKAg/s9dkre6n8/++vVli3MZAOhIg==", + "license": "MIT", "dependencies": { - "@cspell/cspell-types": "8.17.2", + "@cspell/cspell-types": "8.17.3", "comment-json": "^4.2.5", "yaml": "^2.7.0" }, @@ -604,13 +681,14 @@ } }, "node_modules/cspell-dictionary": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.17.2.tgz", - "integrity": "sha512-2JC9RRsZruCs3AHId/8X63fSxDoF94dleRp8y/dXS9LIX7NruofohUJwzc/3tlgzCWWdaek1RXhO5xaYX74QtA==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.17.3.tgz", + "integrity": "sha512-89I/lpQKdkX17RCFrUIJnc70Rjfpup/o+ynHZen0hUxGTfLsEJPrK6H2oGvic3Yrv5q8IOtwM1p8vqPqBkBheA==", + "license": "MIT", "dependencies": { - "@cspell/cspell-pipe": "8.17.2", - "@cspell/cspell-types": "8.17.2", - "cspell-trie-lib": "8.17.2", + "@cspell/cspell-pipe": "8.17.3", + "@cspell/cspell-types": "8.17.3", + "cspell-trie-lib": "8.17.3", "fast-equals": "^5.2.2" }, "engines": { @@ -618,13 +696,14 @@ } }, "node_modules/cspell-gitignore": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-8.17.2.tgz", - "integrity": "sha512-zCTTN30zV96LkZmUDrLamEHpLLUGohKglKJ4iXoHQC8pDU3xTsV2qzeCQjM9SEmU3VbE1TzWq+vj0fslasv6pA==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-8.17.3.tgz", + "integrity": "sha512-rQamjb8R+Nwib/Bpcgf+xv5IdsOHgbP+fe4hCgv0jjgUPkeOR2c4dGwc0WS+2UkJbc+wQohpzBGDLRYGSB/hQw==", + "license": "MIT", "dependencies": { - "@cspell/url": "8.17.2", - "cspell-glob": "8.17.2", - "cspell-io": "8.17.2", + "@cspell/url": "8.17.3", + "cspell-glob": "8.17.3", + "cspell-io": "8.17.3", "find-up-simple": "^1.0.0" }, "bin": { @@ -635,11 +714,12 @@ } }, "node_modules/cspell-glob": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.17.2.tgz", - "integrity": "sha512-MTgrWX12oY8Pq/M3PEYCTHwD6w6l+DPtBWm958nhR4dboUbwi/3KfqCtdorkhnuClqLDQuuZHp0uGBXB4cdQrw==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.17.3.tgz", + "integrity": "sha512-0ov9A0E6OuOO7KOxlGCxJ09LR/ubZ6xcGwWc5bu+jp/8onUowQfe+9vZdznj/o8/vcf5JkDzyhRSBsdhWKqoAg==", + "license": "MIT", "dependencies": { - "@cspell/url": "8.17.2", + "@cspell/url": "8.17.3", "micromatch": "^4.0.8" }, "engines": { @@ -647,12 +727,13 @@ } }, "node_modules/cspell-grammar": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.17.2.tgz", - "integrity": "sha512-Asg5XRvrg2yHCvBwzARBPSwI4P5/unN+bKBlxqFazHgR72WJE+ASeobfUNfGi/RxJA2+m0hO91oYtvq6LfK52w==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.17.3.tgz", + "integrity": "sha512-wfjkkvHthnKJtEaTgx3cPUPquGRXfgXSCwvMJaDyUi36KBlopXX38PejBTdmuqrvp7bINLSuHErml9wAfL5Fxw==", + "license": "MIT", "dependencies": { - "@cspell/cspell-pipe": "8.17.2", - "@cspell/cspell-types": "8.17.2" + "@cspell/cspell-pipe": "8.17.3", + "@cspell/cspell-types": "8.17.3" }, "bin": { "cspell-grammar": "bin.mjs" @@ -662,38 +743,40 @@ } }, "node_modules/cspell-io": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.17.2.tgz", - "integrity": "sha512-IUdhbO6gsWYiM2dgudFJQTfnFCDYjLOqal3SxH5o8oOWeu5iIZ+s3N8E1odz0L5zF2Go7zDQSKvPr7Y9OOoRfw==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.17.3.tgz", + "integrity": "sha512-NwEVb3Kr8loV1C8Stz9QSMgUrBkxqf2s7A9H2/RBnfvQBt9CWZS6NgoNxTPwHj3h1sUNl9reDkMQQzkKtgWGBQ==", + "license": "MIT", "dependencies": { - "@cspell/cspell-service-bus": "8.17.2", - "@cspell/url": "8.17.2" + "@cspell/cspell-service-bus": "8.17.3", + "@cspell/url": "8.17.3" }, "engines": { "node": ">=18" } }, "node_modules/cspell-lib": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.17.2.tgz", - "integrity": "sha512-ZgkTvGh9FO+R3v5TaTqlrJEylWyZhNOzbtrQ5W35Hb3tZ9IJJklxjlcGe+gbFsjGi56kLj6c5L2NR7YX/Fdu5Q==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.17.3.tgz", + "integrity": "sha512-KpwYIj8HwFyTzCCQcyezlmomvyNfPwZQmqTh4V126sFvf9HLoMdfyq8KYDZmZ//4HzwrF/ufJOF3CpuVUiJHfA==", + "license": "MIT", "dependencies": { - "@cspell/cspell-bundled-dicts": "8.17.2", - "@cspell/cspell-pipe": "8.17.2", - "@cspell/cspell-resolver": "8.17.2", - "@cspell/cspell-types": "8.17.2", - "@cspell/dynamic-import": "8.17.2", - "@cspell/filetypes": "8.17.2", - "@cspell/strong-weak-map": "8.17.2", - "@cspell/url": "8.17.2", + "@cspell/cspell-bundled-dicts": "8.17.3", + "@cspell/cspell-pipe": "8.17.3", + "@cspell/cspell-resolver": "8.17.3", + "@cspell/cspell-types": "8.17.3", + "@cspell/dynamic-import": "8.17.3", + "@cspell/filetypes": "8.17.3", + "@cspell/strong-weak-map": "8.17.3", + "@cspell/url": "8.17.3", "clear-module": "^4.1.2", "comment-json": "^4.2.5", - "cspell-config-lib": "8.17.2", - "cspell-dictionary": "8.17.2", - "cspell-glob": "8.17.2", - "cspell-grammar": "8.17.2", - "cspell-io": "8.17.2", - "cspell-trie-lib": "8.17.2", + "cspell-config-lib": "8.17.3", + "cspell-dictionary": "8.17.3", + "cspell-glob": "8.17.3", + "cspell-grammar": "8.17.3", + "cspell-io": "8.17.3", + "cspell-trie-lib": "8.17.3", "env-paths": "^3.0.0", "fast-equals": "^5.2.2", "gensequence": "^7.0.0", @@ -708,12 +791,13 @@ } }, "node_modules/cspell-trie-lib": { - "version": "8.17.2", - "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.17.2.tgz", - "integrity": "sha512-Bw9q8EWFihkQGo8fNdfkUqYOTsC161+wrQxR7m74K4bKEmQgm0mS0sLHKUwxEOZVGGLmIw9dMQl+8WnTgqOaMQ==", + "version": "8.17.3", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.17.3.tgz", + "integrity": "sha512-6LE5BeT2Rwv0bkQckpxX0K1fnFCWfeJ8zVPFtYOaix0trtqj0VNuwWzYDnxyW+OwMioCH29yRAMODa+JDFfUrA==", + "license": "MIT", "dependencies": { - "@cspell/cspell-pipe": "8.17.2", - "@cspell/cspell-types": "8.17.2", + "@cspell/cspell-pipe": "8.17.3", + "@cspell/cspell-types": "8.17.3", "gensequence": "^7.0.0" }, "engines": { @@ -724,6 +808,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", + "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -735,6 +820,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -747,6 +833,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.2.2.tgz", "integrity": "sha512-V7/RktU11J3I36Nwq2JnZEM7tNm17eBJz+u25qdxBZeCKiX6BkVSZQjwWIr+IobgnZy+ag73tTZgZi7tr0LrBw==", + "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -772,6 +859,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -783,6 +871,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", + "license": "MIT", "engines": { "node": ">=18" }, @@ -811,6 +900,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-7.0.0.tgz", "integrity": "sha512-47Frx13aZh01afHJTB3zTtKIlFI6vWY+MYCN9Qpew6i52rfKjnhCF/l1YlC8UmEMvvntZZ6z4PiCcmyuedR2aQ==", + "license": "MIT", "engines": { "node": ">=18" } @@ -831,6 +921,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", + "license": "MIT", "dependencies": { "ini": "4.1.1" }, @@ -845,14 +936,16 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz", "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==", + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -868,6 +961,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -879,6 +973,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "license": "MIT", "engines": { "node": ">=4" } @@ -887,6 +982,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", + "license": "MIT", "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -896,6 +992,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "license": "ISC", "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -904,6 +1001,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -925,6 +1023,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -937,6 +1036,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", + "license": "MIT", "dependencies": { "callsites": "^3.1.0" }, @@ -948,6 +1048,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -959,6 +1060,7 @@ "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "license": "MIT", "engines": { "node": ">=0.10" } @@ -967,6 +1069,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "license": "MIT", "engines": { "node": ">=8" } @@ -1022,6 +1125,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -1032,17 +1136,20 @@ "node_modules/vscode-languageserver-textdocument": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", - "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==" + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==", + "license": "MIT" }, "node_modules/vscode-uri": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", - "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==" + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", + "license": "MIT" }, "node_modules/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", + "license": "MIT", "engines": { "node": ">=12" }, @@ -1054,6 +1161,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", + "license": "ISC", "bin": { "yaml": "bin.mjs" }, diff --git a/package.json b/package.json index 09386166ef..9cda852c7c 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,6 @@ "cspell": "cspell --config ./cSpell.json ./docs/**/*.md --no-progress --no-summary" }, "dependencies": { - "cspell": "^8.17.2" + "cspell": "^8.17.3" } } From e0efc46871cfe78b12b47cf778024faae0ee61d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:48:04 +0000 Subject: [PATCH 15/36] Bump Roslynator.Analyzers from 4.12.10 to 4.12.11 Bumps [Roslynator.Analyzers](https://github.com/dotnet/roslynator) from 4.12.10 to 4.12.11. - [Release notes](https://github.com/dotnet/roslynator/releases) - [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md) - [Commits](https://github.com/dotnet/roslynator/compare/v4.12.10...v4.12.11) --- updated-dependencies: - dependency-name: Roslynator.Analyzers dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 9d396e38fb..409d83d342 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -30,7 +30,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 089211fe9e345260585e70a2ac87f1540b3b7b67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:44:46 +0000 Subject: [PATCH 16/36] Bump TUnit from 0.7.24 to 0.10.6 Bumps [TUnit](https://github.com/thomhurst/TUnit) from 0.7.24 to 0.10.6. - [Release notes](https://github.com/thomhurst/TUnit/releases) - [Commits](https://github.com/thomhurst/TUnit/compare/v0.7.24...v0.10.6) --- updated-dependencies: - dependency-name: TUnit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj index 68546f3aa1..1f361d5650 100644 --- a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj +++ b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj @@ -11,7 +11,7 @@ - + From 7b53b8a82c36a48a7ae4bb14cd81c4f338187e41 Mon Sep 17 00:00:00 2001 From: Dennis Doomen Date: Fri, 24 Jan 2025 20:53:49 +0100 Subject: [PATCH 17/36] Improves the subject identification for chained assertions and those that use Which --- Src/FluentAssertions/AndWhichConstraint.cs | 23 ++++ .../CallerStatementBuilder.cs | 51 +++++---- .../CallerIdentification/ParsingState.cs | 19 +++- .../SemicolonParsingStrategy.cs | 2 +- .../ShouldCallParsingStrategy.cs | 46 +++++--- .../WhichParsingStrategy.cs | 54 ++++++++++ Src/FluentAssertions/CallerIdentifier.cs | 62 +++++++---- .../GenericCollectionAssertions.cs | 6 +- .../Common/StringExtensions.cs | 13 +-- .../Execution/AssertionChain.cs | 45 +++----- .../Execution/SubjectIdentificationBuilder.cs | 102 ++++++++++++++++++ .../Types/MemberInfoAssertions.cs | 2 +- Src/FluentAssertions/Types/TypeAssertions.cs | 8 +- .../FluentAssertions/net47.verified.txt | 2 + .../FluentAssertions/net6.0.verified.txt | 2 + .../netstandard2.0.verified.txt | 2 + .../netstandard2.1.verified.txt | 2 + .../AndWhichConstraintSpecs.cs | 3 +- .../Execution/CallerIdentificationSpecs.cs | 63 +++++++++++ .../Types/MethodInfoAssertionSpecs.cs | 14 --- docs/_pages/releases.md | 3 + 21 files changed, 404 insertions(+), 120 deletions(-) create mode 100644 Src/FluentAssertions/CallerIdentification/WhichParsingStrategy.cs create mode 100644 Src/FluentAssertions/Execution/SubjectIdentificationBuilder.cs diff --git a/Src/FluentAssertions/AndWhichConstraint.cs b/Src/FluentAssertions/AndWhichConstraint.cs index 49df87657e..37d6183a47 100644 --- a/Src/FluentAssertions/AndWhichConstraint.cs +++ b/Src/FluentAssertions/AndWhichConstraint.cs @@ -47,12 +47,29 @@ public AndWhichConstraint(TParent parent, TSubject subject, AssertionChain asser /// /// If contains more than one object, a clear exception is thrown. /// + // REFACTOR: In a next major version, we need to remove this overload and make the AssertionChain required public AndWhichConstraint(TParent parent, IEnumerable subjects) : base(parent) { getSubject = new Lazy(() => Single(subjects)); } + /// + /// Creates an object that allows continuing an assertion executed through and + /// which resulted in a potential collection of objects through on an + /// existing . + /// + /// + /// If contains more than one object, a clear exception is thrown. + /// + public AndWhichConstraint(TParent parent, IEnumerable subjects, AssertionChain assertionChain) + : base(parent) + { + getSubject = new Lazy(() => Single(subjects)); + + this.assertionChain = assertionChain; + } + /// /// Creates an object that allows continuing an assertion executed through and /// which resulted in a potential collection of objects through on an @@ -108,6 +125,12 @@ public TSubject Which { assertionChain.WithCallerPostfix(pathPostfix).ReuseOnce(); } + else + { + // Make sure the caller identification restarts with the code following the Which property. + assertionChain?.AdvanceToNextIdentifier(); + assertionChain?.ReuseOnce(); + } return getSubject.Value; } diff --git a/Src/FluentAssertions/CallerIdentification/CallerStatementBuilder.cs b/Src/FluentAssertions/CallerIdentification/CallerStatementBuilder.cs index 7f922f2009..543338a3f0 100644 --- a/Src/FluentAssertions/CallerIdentification/CallerStatementBuilder.cs +++ b/Src/FluentAssertions/CallerIdentification/CallerStatementBuilder.cs @@ -4,48 +4,62 @@ namespace FluentAssertions.CallerIdentification; +// REFACTOR: This is not a builder, but a parser, so rename it accordingly. internal class CallerStatementBuilder { private readonly StringBuilder statement; - private readonly List priorityOrderedParsingStrategies; - private ParsingState parsingState = ParsingState.InProgress; + private readonly List parsingStrategies; + private readonly List candidates = new(); + private ParsingState state = ParsingState.InProgress; internal CallerStatementBuilder() { statement = new StringBuilder(); - priorityOrderedParsingStrategies = + parsingStrategies = [ new QuotesParsingStrategy(), new MultiLineCommentParsingStrategy(), new SingleLineCommentParsingStrategy(), new SemicolonParsingStrategy(), new ShouldCallParsingStrategy(), + new WhichParsingStrategy(), new AwaitParsingStrategy(), new AddNonEmptySymbolParsingStrategy() ]; } - internal void Append(string symbols) + /// + /// Gets the identifiers preceding a Should or Which clause as extracted from lines of code passed to + /// + public string[] Identifiers => candidates.ToArray(); + + public void Append(string symbols) { using var symbolEnumerator = symbols.GetEnumerator(); - while (symbolEnumerator.MoveNext() && parsingState != ParsingState.Done) + while (symbolEnumerator.MoveNext() && state != ParsingState.Completed) { - var hasParsingStrategyWaitingForEndContext = priorityOrderedParsingStrategies - .Exists(s => s.IsWaitingForContextEnd()); + // The logic ensures that parsing does not continue with irrelevant strategies when a strategy is currently in the middle + // of a multi-symbol context (e.g., waiting for "_/" to match the beginning "/_"). In such cases, it skips over strategies + // that aren't waiting for the "end of context" while allowing the active (waiting) strategy to resume processing. + IEnumerable activeParsers = parsingStrategies; + if (parsingStrategies.Exists(s => s.IsWaitingForContextEnd())) + { + activeParsers = parsingStrategies.SkipWhile(parsingStrategy => !parsingStrategy.IsWaitingForContextEnd()); + } - parsingState = ParsingState.InProgress; + state = ParsingState.InProgress; - foreach (var parsingStrategy in - priorityOrderedParsingStrategies - .SkipWhile(parsingStrategy => - hasParsingStrategyWaitingForEndContext - && !parsingStrategy.IsWaitingForContextEnd())) + foreach (IParsingStrategy parser in activeParsers) { - parsingState = parsingStrategy.Parse(symbolEnumerator.Current, statement); + state = parser.Parse(symbolEnumerator.Current, statement); + if (state == ParsingState.CandidateFound) + { + candidates.Add(statement.ToString()); + } - if (parsingState != ParsingState.InProgress) + if (state != ParsingState.InProgress) { break; } @@ -57,11 +71,8 @@ internal void Append(string symbols) return; } - priorityOrderedParsingStrategies - .ForEach(strategy => strategy.NotifyEndOfLineReached()); + parsingStrategies.ForEach(strategy => strategy.NotifyEndOfLineReached()); } - internal bool IsDone() => parsingState == ParsingState.Done; - - public override string ToString() => statement.ToString(); + public bool IsDone() => state == ParsingState.Completed; } diff --git a/Src/FluentAssertions/CallerIdentification/ParsingState.cs b/Src/FluentAssertions/CallerIdentification/ParsingState.cs index 6548ae2627..18ac092068 100644 --- a/Src/FluentAssertions/CallerIdentification/ParsingState.cs +++ b/Src/FluentAssertions/CallerIdentification/ParsingState.cs @@ -2,7 +2,24 @@ internal enum ParsingState { + /// + /// Is returned by a parser when the next one can take a look at the current symbol + /// InProgress, + + /// + /// Is returned by a parser when it decides a symbol has been processed enough and no + /// other parsers need to look at the current symbol anymore. + /// GoToNextSymbol, - Done + + /// + /// Is returned by a parser if it has found a candidate identifier. + /// + CandidateFound, + + /// + /// Is returned by a parser to indicate that the parsing has been fully completed. + /// + Completed } diff --git a/Src/FluentAssertions/CallerIdentification/SemicolonParsingStrategy.cs b/Src/FluentAssertions/CallerIdentification/SemicolonParsingStrategy.cs index 17a6601cc0..c5480ef6b5 100644 --- a/Src/FluentAssertions/CallerIdentification/SemicolonParsingStrategy.cs +++ b/Src/FluentAssertions/CallerIdentification/SemicolonParsingStrategy.cs @@ -9,7 +9,7 @@ public ParsingState Parse(char symbol, StringBuilder statement) if (symbol is ';') { statement.Clear(); - return ParsingState.Done; + return ParsingState.Completed; } return ParsingState.InProgress; diff --git a/Src/FluentAssertions/CallerIdentification/ShouldCallParsingStrategy.cs b/Src/FluentAssertions/CallerIdentification/ShouldCallParsingStrategy.cs index 4ff4555312..e7a82a85dd 100644 --- a/Src/FluentAssertions/CallerIdentification/ShouldCallParsingStrategy.cs +++ b/Src/FluentAssertions/CallerIdentification/ShouldCallParsingStrategy.cs @@ -2,37 +2,49 @@ namespace FluentAssertions.CallerIdentification; +/// +/// Tries to determine if the statement ends with ".Should(" or ".Should.", and assumes +/// the preceding identifier is the actual identifier. +/// internal class ShouldCallParsingStrategy : IParsingStrategy { - private const string ShouldCall = ".Should"; + private const string ExpectedPhrase = ".Should"; public ParsingState Parse(char symbol, StringBuilder statement) { - if (statement.Length >= ShouldCall.Length + 1) + if (IsLongEnough(statement) && EndsWithExpectedPhrase(statement) && EndsWithInvocation(statement)) { - var leftIndex = statement.Length - 2; - var rightIndex = ShouldCall.Length - 1; + // Remove the ".Should." or ".Should(" part from the statement, so we keep the actual identifier + statement.Remove(statement.Length - (ExpectedPhrase.Length + 1), ExpectedPhrase.Length + 1); + return ParsingState.CandidateFound; + } - for (var i = 0; i < ShouldCall.Length; i++) - { - if (statement[leftIndex - i] != ShouldCall[rightIndex - i]) - { - return ParsingState.InProgress; - } - } + return ParsingState.InProgress; + } + + private static bool IsLongEnough(StringBuilder statement) => statement.Length >= ExpectedPhrase.Length + 1; - if (statement[^1] is not ('(' or '.')) + private static bool EndsWithExpectedPhrase(StringBuilder statement) + { + // Start from the index on the character just before the last ( or . + var rightIndexInStatement = statement.Length - 2; + + var rightIndexInExpectedPhrase = ExpectedPhrase.Length - 1; + + // Do a reverse comparison to see if the statement ends with ".Should" + for (var i = 0; i < ExpectedPhrase.Length; i++) + { + if (statement[rightIndexInStatement - i] != ExpectedPhrase[rightIndexInExpectedPhrase - i]) { - return ParsingState.InProgress; + return false; } - - statement.Remove(statement.Length - (ShouldCall.Length + 1), ShouldCall.Length + 1); - return ParsingState.Done; } - return ParsingState.InProgress; + return true; } + private static bool EndsWithInvocation(StringBuilder statement) => statement[^1] is '(' or '.'; + public bool IsWaitingForContextEnd() { return false; diff --git a/Src/FluentAssertions/CallerIdentification/WhichParsingStrategy.cs b/Src/FluentAssertions/CallerIdentification/WhichParsingStrategy.cs new file mode 100644 index 0000000000..872deb78e5 --- /dev/null +++ b/Src/FluentAssertions/CallerIdentification/WhichParsingStrategy.cs @@ -0,0 +1,54 @@ +using System.Text; + +namespace FluentAssertions.CallerIdentification; + +/// +/// Tries to find the .Which. construct and assumes everything preceding it has become irrelevant +/// for the chained assertion. +/// +internal class WhichParsingStrategy : IParsingStrategy +{ + private const string ExpectedPhrase = ".Which."; + + public ParsingState Parse(char symbol, StringBuilder statement) + { + if (IsLongEnough(statement) && EndsWithExpectedPhrase(statement)) + { + // Remove everything we collected up to know and assume everything following the + // .Which. property is a new assertion + statement.Clear(); + } + + return ParsingState.InProgress; + } + + private static bool IsLongEnough(StringBuilder statement) => statement.Length >= ExpectedPhrase.Length; + + private static bool EndsWithExpectedPhrase(StringBuilder statement) + { + // Start from the index of the last character + var rightIndexInStatement = statement.Length - 1; + + var rightIndexInExpectedPhrase = ExpectedPhrase.Length - 1; + + // Do a reverse comparison to see if the statement ends with ".Which." + for (var i = 0; i < ExpectedPhrase.Length; i++) + { + if (statement[rightIndexInStatement - i] != ExpectedPhrase[rightIndexInExpectedPhrase - i]) + { + return false; + } + } + + return true; + } + + public bool IsWaitingForContextEnd() + { + return false; + } + + public void NotifyEndOfLineReached() + { + } +} diff --git a/Src/FluentAssertions/CallerIdentifier.cs b/Src/FluentAssertions/CallerIdentifier.cs index fc815fc972..afa39a93bb 100644 --- a/Src/FluentAssertions/CallerIdentifier.cs +++ b/Src/FluentAssertions/CallerIdentifier.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; @@ -19,9 +20,28 @@ public static class CallerIdentifier { public static Action Logger { get; set; } = _ => { }; + /// + /// Gets the identifier that precedes the first Should call in the chain. + /// public static string DetermineCallerIdentity() { - string caller = null; + return DetermineCallerIdentities().FirstOrDefault(); + } + + /// + /// Gets all identifiers of all assertions in order of appearance. + /// + /// + /// For example, given the following code + /// collection.Should().ContainSingle() + /// .Which.Parameters.Should().ContainSingle() + /// .Which.Should().Be(3) + /// + /// will return collection, Parameters and an empty string. + /// + public static string[] DetermineCallerIdentities() + { + string[] callers = []; try { @@ -57,7 +77,7 @@ public static string DetermineCallerIdentity() && !IsCustomAssertion(frame) && !IsCurrentAssembly(frame)) { - caller = ExtractVariableNameFrom(frame); + callers = ExtractCallersFrom(frame).ToArray(); break; } } @@ -68,7 +88,7 @@ public static string DetermineCallerIdentity() Logger(e.ToString()); } - return caller; + return callers; } private sealed class StackFrameReference : IDisposable @@ -169,26 +189,23 @@ private static bool IsCompilerServices(StackFrame frame) return frame.GetMethod()?.DeclaringType?.Namespace is "System.Runtime.CompilerServices"; } - private static string ExtractVariableNameFrom(StackFrame frame) + private static IEnumerable ExtractCallersFrom(StackFrame frame) { - string caller = null; - string statement = GetSourceCodeStatementFrom(frame); + string[] identifiers = GetCallerIdentifiersFrom(frame); - if (!string.IsNullOrEmpty(statement)) + foreach (string identifier in identifiers) { - Logger(statement); + Logger(identifier); - if (!IsBooleanLiteral(statement) && !IsNumeric(statement) && !IsStringLiteral(statement) && - !StartsWithNewKeyword(statement)) + if (!IsBooleanLiteral(identifier) && !IsNumeric(identifier) && !IsStringLiteral(identifier) && + !StartsWithNewKeyword(identifier)) { - caller = statement; + yield return identifier; } } - - return caller; } - private static string GetSourceCodeStatementFrom(StackFrame frame) + private static string[] GetCallerIdentifiersFrom(StackFrame frame) { string fileName = frame.GetFileName(); int expectedLineNumber = frame.GetFileLineNumber(); @@ -209,19 +226,18 @@ private static string GetSourceCodeStatementFrom(StackFrame frame) currentLine++; } - return currentLine == expectedLineNumber - && line != null - ? GetSourceCodeStatementFrom(frame, reader, line) + return currentLine == expectedLineNumber && line != null + ? GetCallerIdentifiersFrom(frame, reader, line) : null; } catch { // We don't care. Just assume the symbol file is not available or unreadable - return null; + return []; } } - private static string GetSourceCodeStatementFrom(StackFrame frame, StreamReader reader, string line) + private static string[] GetCallerIdentifiersFrom(StackFrame frame, StreamReader reader, string line) { int column = frame.GetFileColumnNumber(); @@ -230,15 +246,15 @@ private static string GetSourceCodeStatementFrom(StackFrame frame, StreamReader line = line.Substring(Math.Min(column - 1, line.Length - 1)); } - var sb = new CallerStatementBuilder(); + var parser = new CallerStatementBuilder(); do { - sb.Append(line); + parser.Append(line); } - while (!sb.IsDone() && (line = reader.ReadLine()) != null); + while (!parser.IsDone() && (line = reader.ReadLine()) != null); - return sb.ToString(); + return parser.Identifiers; } private static bool StartsWithNewKeyword(string candidate) diff --git a/Src/FluentAssertions/Collections/GenericCollectionAssertions.cs b/Src/FluentAssertions/Collections/GenericCollectionAssertions.cs index ebc69508e9..7984f73a72 100644 --- a/Src/FluentAssertions/Collections/GenericCollectionAssertions.cs +++ b/Src/FluentAssertions/Collections/GenericCollectionAssertions.cs @@ -725,7 +725,7 @@ public AndWhichConstraint Contain(T expected, matches = collection.Where(item => EqualityComparer.Default.Equals(item, expected)); } - return new AndWhichConstraint((TAssertions)this, matches); + return new AndWhichConstraint((TAssertions)this, matches, assertionChain); } /// @@ -775,9 +775,7 @@ public AndWhichConstraint Contain(Expression> pred matches = Subject.Where(func); } - assertionChain.WithCallerPostfix($"[{firstMatchingIndex}]").ReuseOnce(); - - return new AndWhichConstraint((TAssertions)this, matches); + return new AndWhichConstraint((TAssertions)this, matches, assertionChain, $"[{firstMatchingIndex}]"); } /// diff --git a/Src/FluentAssertions/Common/StringExtensions.cs b/Src/FluentAssertions/Common/StringExtensions.cs index b871f3f60a..9730aaf3b9 100644 --- a/Src/FluentAssertions/Common/StringExtensions.cs +++ b/Src/FluentAssertions/Common/StringExtensions.cs @@ -60,24 +60,25 @@ public static string EscapePlaceholders(this string value) => value.Replace("{", "{{", StringComparison.Ordinal).Replace("}", "}}", StringComparison.Ordinal); /// - /// Joins a string with one or more other strings using a specified separator. + /// Joins a string with another string using the specified separator. /// /// - /// Any string that is empty (including the original string) is ignored. + /// Any string that is empty or null (including the original string) is ignored. Also, if the second + /// string starts with an index operator, the separator is omitted. /// public static string Combine(this string @this, string other, string separator = ".") { - if (@this.Length == 0) + if (@this.IsNullOrEmpty()) { - return other.Length != 0 ? other : string.Empty; + return !other.IsNullOrEmpty() ? other : string.Empty; } - if (other.StartsWith('[')) + if (other is null || other.StartsWith('[')) { separator = string.Empty; } - return @this + separator + other; + return @this + separator + (other ?? ""); } /// diff --git a/Src/FluentAssertions/Execution/AssertionChain.cs b/Src/FluentAssertions/Execution/AssertionChain.cs index a565ca8d79..8be7c48ee9 100644 --- a/Src/FluentAssertions/Execution/AssertionChain.cs +++ b/Src/FluentAssertions/Execution/AssertionChain.cs @@ -17,14 +17,13 @@ public sealed class AssertionChain { private readonly Func getCurrentScope; private readonly ContextDataDictionary contextData = new(); + private readonly SubjectIdentificationBuilder identifierBuilder; private string fallbackIdentifier = "object"; - private Func getCallerIdentifier; private Func reason; private bool? succeeded; // We need to keep track of this because we don't want the second successful assertion hide the first unsuccessful assertion private Func expectation; - private string callerPostfix = string.Empty; private static readonly AsyncLocal Instance = new(); @@ -52,7 +51,7 @@ public void ReuseOnce() /// This property is used to track if the caller identifier has been customized using the /// method or similar methods that modify the identifier. /// - public bool HasOverriddenCallerIdentifier { get; private set; } + public bool HasOverriddenCallerIdentifier => identifierBuilder.HasOverriddenIdentifier; /// /// Either starts a new assertion chain, or, when was called, for once, will return @@ -68,31 +67,14 @@ public static AssertionChain GetOrCreate() } return new AssertionChain(() => AssertionScope.Current, - () => FluentAssertions.CallerIdentifier.DetermineCallerIdentity()); + () => FluentAssertions.CallerIdentifier.DetermineCallerIdentities()); } - private AssertionChain(Func getCurrentScope, Func getCallerIdentifier) + private AssertionChain(Func getCurrentScope, Func getCallerIdentifiers) { this.getCurrentScope = getCurrentScope; - this.getCallerIdentifier = () => - { - var scopeName = getCurrentScope().Name(); - var callerIdentifier = getCallerIdentifier(); - - if (scopeName is null) - { - return callerIdentifier; - } - else if (callerIdentifier is null) - { - return scopeName; - } - else - { - return $"{scopeName}/{callerIdentifier}"; - } - }; + identifierBuilder = new SubjectIdentificationBuilder(getCallerIdentifiers, () => getCurrentScope().Name()); } /// @@ -102,7 +84,7 @@ private AssertionChain(Func getCurrentScope, Func getCal /// /// Can be overridden with . /// - public string CallerIdentifier => getCallerIdentifier() + callerPostfix; + public string CallerIdentifier => identifierBuilder.Build(); /// /// Adds an explanation of why the assertion is supposed to succeed to the scope. @@ -291,8 +273,7 @@ private Continuation FailWith(Func getFailureReason) /// public void OverrideCallerIdentifier(Func getCallerIdentifier) { - this.getCallerIdentifier = getCallerIdentifier; - HasOverriddenCallerIdentifier = true; + identifierBuilder.OverrideSubjectIdentifier(getCallerIdentifier); } /// @@ -305,12 +286,20 @@ public void OverrideCallerIdentifier(Func getCallerIdentifier) /// public AssertionChain WithCallerPostfix(string postfix) { - callerPostfix = postfix; - HasOverriddenCallerIdentifier = true; + identifierBuilder.UsePostfix(postfix); return this; } + /// + /// Marks the next assertion as being part of a chained call to Should where it needs to find the next + /// caller identifier. + /// + internal void AdvanceToNextIdentifier() + { + identifierBuilder.AdvanceToNextSubject(); + } + /// /// Adds some information to the assertion that will be included in the message /// that is emitted if an assertion fails. diff --git a/Src/FluentAssertions/Execution/SubjectIdentificationBuilder.cs b/Src/FluentAssertions/Execution/SubjectIdentificationBuilder.cs new file mode 100644 index 0000000000..b30f391c9f --- /dev/null +++ b/Src/FluentAssertions/Execution/SubjectIdentificationBuilder.cs @@ -0,0 +1,102 @@ +using System; +using FluentAssertions.Common; + +namespace FluentAssertions.Execution; + +/// +/// Responsible for constructing the code phrase that identifies the subject-under-test and which is used +/// in assertion failures managed by a single . +/// +/// +/// Takes into account the caller identifiers extracted from the invoking code, any scopes created through +/// (nested) instances of and modifications made by the +/// . +/// +internal class SubjectIdentificationBuilder +{ + private readonly Func getScopeName; + private readonly Lazy identifiersExtractedFromTheCode; + private int identifierIndex; + private Func getSubject; + + public SubjectIdentificationBuilder(Func getCallerIdentifiers, Func getScopeName) + { + this.getScopeName = getScopeName; + + identifiersExtractedFromTheCode = new(() => getCallerIdentifiers()); + + getSubject = () => GetIdentifier(0); + } + + /// + /// Tells the builder to assume the assertion has moved to the next identifier in a chained assertion. + /// + public void AdvanceToNextSubject() + { + identifierIndex++; + var localIndex = identifierIndex; + + getSubject = () => GetIdentifier(localIndex); + } + + /// + /// Indicates whether the subject identifier has been overridden with a custom value during the assertion process. + /// + /// + /// When or is called, + /// this property is set to true, signaling that a manually defined identifier is now used instead of + /// automatically constructed identifiers. + /// + public bool HasOverriddenIdentifier { get; private set; } + + /// + /// Completely overrides the construction process with the specified lazy-evaluated identifier. + /// + public void OverrideSubjectIdentifier(Func getSubject) + { + HasOverriddenIdentifier = true; + this.getSubject = getSubject; + } + + /// + /// Appends the given postfix to the current subject and combines that with next subject. + /// + /// + /// If the postfix is [0], the current identifier is collection, and the next one + /// is Parameters, this method will assume the subject is collection[0].Parameters. + /// + public void UsePostfix(string postfix) + { + var localIndex = identifierIndex; + getSubject = () => (GetIdentifier(localIndex) + postfix).Combine(GetIdentifier(localIndex + 1)); + + HasOverriddenIdentifier = true; + } + + /// + /// Returns the constructed subject identifier. + /// + public string Build() + { + var scopeName = getScopeName(); + var callerIdentifier = getSubject(); + + if (scopeName is null) + { + return callerIdentifier; + } + else if (callerIdentifier is null) + { + return scopeName; + } + else + { + return $"{scopeName}/{callerIdentifier}"; + } + } + + private string GetIdentifier(int index) + { + return identifiersExtractedFromTheCode.Value.Length > index ? identifiersExtractedFromTheCode.Value[index] : null; + } +} diff --git a/Src/FluentAssertions/Types/MemberInfoAssertions.cs b/Src/FluentAssertions/Types/MemberInfoAssertions.cs index 348d8f484f..3e214fd28c 100644 --- a/Src/FluentAssertions/Types/MemberInfoAssertions.cs +++ b/Src/FluentAssertions/Types/MemberInfoAssertions.cs @@ -104,7 +104,7 @@ public AndWhichConstraint, TAttribut ", but that attribute was not found."); } - return new AndWhichConstraint, TAttribute>(this, attributes); + return new AndWhichConstraint, TAttribute>(this, attributes, assertionChain); } /// diff --git a/Src/FluentAssertions/Types/TypeAssertions.cs b/Src/FluentAssertions/Types/TypeAssertions.cs index 1efa74d961..37699196a0 100644 --- a/Src/FluentAssertions/Types/TypeAssertions.cs +++ b/Src/FluentAssertions/Types/TypeAssertions.cs @@ -251,7 +251,7 @@ public AndWhichConstraint BeDecoratedWith(this, attributes); + return new AndWhichConstraint(this, attributes, assertionChain); } /// @@ -287,7 +287,7 @@ public AndWhichConstraint BeDecoratedWith(this, attributes); + return new AndWhichConstraint(this, attributes, assertionChain); } /// @@ -312,7 +312,7 @@ public AndWhichConstraint BeDecoratedWithOrInherit(this, attributes); + return new AndWhichConstraint(this, attributes, assertionChain); } /// @@ -348,7 +348,7 @@ public AndWhichConstraint BeDecoratedWithOrInherit(this, attributes); + return new AndWhichConstraint(this, attributes, assertionChain); } /// diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt index 125c549256..05b4c07fd9 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net47.verified.txt @@ -19,6 +19,7 @@ namespace FluentAssertions { public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects) { } public AndWhichConstraint(TParent parent, TSubject subject) { } + public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects, FluentAssertions.Execution.AssertionChain assertionChain) { } public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects, FluentAssertions.Execution.AssertionChain assertionChain, string pathPostfix) { } public AndWhichConstraint(TParent parent, TSubject subject, FluentAssertions.Execution.AssertionChain assertionChain, string pathPostfix = "") { } public TSubject Subject { get; } @@ -191,6 +192,7 @@ namespace FluentAssertions public static class CallerIdentifier { public static System.Action Logger { get; set; } + public static string[] DetermineCallerIdentities() { } public static string DetermineCallerIdentity() { } } [System.AttributeUsage(System.AttributeTargets.Method)] diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt index 0829729382..784751b7cd 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/net6.0.verified.txt @@ -19,6 +19,7 @@ namespace FluentAssertions { public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects) { } public AndWhichConstraint(TParent parent, TSubject subject) { } + public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects, FluentAssertions.Execution.AssertionChain assertionChain) { } public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects, FluentAssertions.Execution.AssertionChain assertionChain, string pathPostfix) { } public AndWhichConstraint(TParent parent, TSubject subject, FluentAssertions.Execution.AssertionChain assertionChain, string pathPostfix = "") { } public TSubject Subject { get; } @@ -204,6 +205,7 @@ namespace FluentAssertions public static class CallerIdentifier { public static System.Action Logger { get; set; } + public static string[] DetermineCallerIdentities() { } public static string DetermineCallerIdentity() { } } [System.AttributeUsage(System.AttributeTargets.Method)] diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt index 8b4d66bb7d..0d8eb031a6 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.0.verified.txt @@ -19,6 +19,7 @@ namespace FluentAssertions { public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects) { } public AndWhichConstraint(TParent parent, TSubject subject) { } + public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects, FluentAssertions.Execution.AssertionChain assertionChain) { } public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects, FluentAssertions.Execution.AssertionChain assertionChain, string pathPostfix) { } public AndWhichConstraint(TParent parent, TSubject subject, FluentAssertions.Execution.AssertionChain assertionChain, string pathPostfix = "") { } public TSubject Subject { get; } @@ -189,6 +190,7 @@ namespace FluentAssertions public static class CallerIdentifier { public static System.Action Logger { get; set; } + public static string[] DetermineCallerIdentities() { } public static string DetermineCallerIdentity() { } } [System.AttributeUsage(System.AttributeTargets.Method)] diff --git a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt index 22504da4e3..fb4ece81e4 100644 --- a/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt +++ b/Tests/Approval.Tests/ApprovedApi/FluentAssertions/netstandard2.1.verified.txt @@ -19,6 +19,7 @@ namespace FluentAssertions { public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects) { } public AndWhichConstraint(TParent parent, TSubject subject) { } + public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects, FluentAssertions.Execution.AssertionChain assertionChain) { } public AndWhichConstraint(TParent parent, System.Collections.Generic.IEnumerable subjects, FluentAssertions.Execution.AssertionChain assertionChain, string pathPostfix) { } public AndWhichConstraint(TParent parent, TSubject subject, FluentAssertions.Execution.AssertionChain assertionChain, string pathPostfix = "") { } public TSubject Subject { get; } @@ -191,6 +192,7 @@ namespace FluentAssertions public static class CallerIdentifier { public static System.Action Logger { get; set; } + public static string[] DetermineCallerIdentities() { } public static string DetermineCallerIdentity() { } } [System.AttributeUsage(System.AttributeTargets.Method)] diff --git a/Tests/FluentAssertions.Specs/AndWhichConstraintSpecs.cs b/Tests/FluentAssertions.Specs/AndWhichConstraintSpecs.cs index a4aa52a96c..d59a6c423e 100644 --- a/Tests/FluentAssertions.Specs/AndWhichConstraintSpecs.cs +++ b/Tests/FluentAssertions.Specs/AndWhichConstraintSpecs.cs @@ -1,5 +1,6 @@ using System; using FluentAssertions.Collections; +using FluentAssertions.Execution; using Xunit; using Xunit.Sdk; @@ -11,7 +12,7 @@ public class AndWhichConstraintSpecs public void When_many_objects_are_provided_accessing_which_should_throw_a_descriptive_exception() { // Arrange - var continuation = new AndWhichConstraint(null, ["hello", "world"]); + var continuation = new AndWhichConstraint(null, ["hello", "world"], AssertionChain.GetOrCreate()); // Act Action act = () => _ = continuation.Which; diff --git a/Tests/FluentAssertions.Specs/Execution/CallerIdentificationSpecs.cs b/Tests/FluentAssertions.Specs/Execution/CallerIdentificationSpecs.cs index a298db914a..f9a5e33dd7 100644 --- a/Tests/FluentAssertions.Specs/Execution/CallerIdentificationSpecs.cs +++ b/Tests/FluentAssertions.Specs/Execution/CallerIdentificationSpecs.cs @@ -2,11 +2,14 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Reflection; using System.Threading.Tasks; using FluentAssertions; +using FluentAssertions.Common; using FluentAssertions.Equivalency; using FluentAssertions.Execution; using FluentAssertions.Extensions; +using FluentAssertions.Specs.Types; using Xunit; using Xunit.Sdk; @@ -31,6 +34,7 @@ public void Types_in_the_system_namespace_are_excluded_from_identification() public void Types_in_a_namespace_nested_under_system_are_excluded_from_identification() { // Act + // ReSharper disable once RedundantNameQualifier Action act = () => System.Data.NestedSystemNamespaceClass.AssertAgainstFailure(); // Assert @@ -41,6 +45,7 @@ public void Types_in_a_namespace_nested_under_system_are_excluded_from_identific public void Types_in_a_namespace_prefixed_with_system_are_excluded_from_identification() { // Act + // ReSharper disable once RedundantNameQualifier Action act = () => SystemPrefixed.SystemPrefixedNamespaceClass.AssertAgainstFailure(); // Assert @@ -154,6 +159,7 @@ public void When_the_caller_contains_multiple_members_it_should_include_them_all { // Arrange string test1 = "test1"; + var foo = new Foo { Field = "test3" @@ -172,6 +178,7 @@ public void When_the_caller_contains_multiple_members_across_multiple_lines_it_s { // Arrange string test1 = "test1"; + var foo = new Foo { Field = "test3" @@ -570,6 +577,62 @@ 5. Test node.Subject.Description.Should().StartWith("node.Subject.Description"); } + [Fact] + public void When_a_method_is_decorated_with_an_attribute_it_should_allow_chaining_assertions_on_it() + { + // Arrange + MethodInfo methodInfo = + typeof(ClassWithAllMethodsDecoratedWithDummyAttribute).GetParameterlessMethod("PublicDoNothing"); + + // Act + Action act = () => methodInfo.Should().BeDecoratedWith().Which.Filter.Should().BeFalse(); + + // Assert + act.Should().Throw().WithMessage("Expected Filter to be False, but found True."); + } + + [Fact] + public void Can_handle_chained_assertions() + { + // Arrange + var collection = new[] + { + new + { + Parameters = new[] { "a", "b", "c" } + } + }; + + // Act + Action act = () => collection.Should().ContainSingle().Which.Parameters[0].Should().Be("d"); + + // Assert + act.Should().Throw() + .WithMessage("Expected collection[0].Parameters[0] to be \"d\", but*"); + } + + [Fact] + public void Can_handle_chained_assertions_spread_over_multiple_lines() + { + // Arrange + var collection = new[] + { + new + { + Parameters = new[] { "a", "b", "c" } + } + }; + + // Act + Action act = () => collection.Should().ContainSingle() + .Which + .Parameters[0].Should().Be("d"); + + // Assert + act.Should().Throw() + .WithMessage("Expected collection[0].Parameters[0] to be \"d\", but*"); + } + [CustomAssertion] private string GetSubjectId() => AssertionChain.GetOrCreate().CallerIdentifier; } diff --git a/Tests/FluentAssertions.Specs/Types/MethodInfoAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Types/MethodInfoAssertionSpecs.cs index 83787028e9..2fc1b4af3b 100644 --- a/Tests/FluentAssertions.Specs/Types/MethodInfoAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Types/MethodInfoAssertionSpecs.cs @@ -223,20 +223,6 @@ public void When_asserting_a_class_is_decorated_with_MethodImpl_attribute_and_it "System.Runtime.CompilerServices.MethodImplAttribute, but the attribute was not found."); } - [Fact] - public void When_a_method_is_decorated_with_an_attribute_it_should_allow_chaining_assertions_on_it() - { - // Arrange - MethodInfo methodInfo = - typeof(ClassWithAllMethodsDecoratedWithDummyAttribute).GetParameterlessMethod("PublicDoNothing"); - - // Act - Action act = () => methodInfo.Should().BeDecoratedWith().Which.Filter.Should().BeFalse(); - - // Assert - act.Should().Throw(); - } - [Fact] public void When_asserting_a_method_is_decorated_with_an_attribute_but_it_is_not_it_throws_with_a_useful_message() { diff --git a/docs/_pages/releases.md b/docs/_pages/releases.md index b579e39a69..c966ea51ce 100644 --- a/docs/_pages/releases.md +++ b/docs/_pages/releases.md @@ -9,6 +9,9 @@ sidebar: ## 8.1.0 +### Improvements +* Improved subject identification when chaining multiple assertions using `Which` - [#3000](https://github.com/fluentassertions/fluentassertions/pull/3000) +* All `Should()` methods on reference types are now annotated with the `[NotNull]` attribute for a better Fluent Assertions experience when nullable reference types are enabled - [#2987](https://github.com/fluentassertions/fluentassertions/pull/2987) * Provide a toggle to suppress the soft warning that commercial use requires a paid license - [#2984](https://github.com/fluentassertions/fluentassertions/pull/2984) ## 8.0.0 From 32fa7388f7508ad0f778719cc7860f9e2bdf1624 Mon Sep 17 00:00:00 2001 From: Dennis Doomen Date: Fri, 7 Feb 2025 18:26:35 +0100 Subject: [PATCH 18/36] Rename CallerStatementBuilder to StatementParser Renamed the class to better reflect its responsibility as a parser rather than a builder. Adjusted all references to the class accordingly to maintain consistency. This improves clarity and aligns with naming conventions. --- .../{CallerStatementBuilder.cs => StatementParser.cs} | 5 ++--- Src/FluentAssertions/CallerIdentifier.cs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) rename Src/FluentAssertions/CallerIdentification/{CallerStatementBuilder.cs => StatementParser.cs} (94%) diff --git a/Src/FluentAssertions/CallerIdentification/CallerStatementBuilder.cs b/Src/FluentAssertions/CallerIdentification/StatementParser.cs similarity index 94% rename from Src/FluentAssertions/CallerIdentification/CallerStatementBuilder.cs rename to Src/FluentAssertions/CallerIdentification/StatementParser.cs index 543338a3f0..2b9497653d 100644 --- a/Src/FluentAssertions/CallerIdentification/CallerStatementBuilder.cs +++ b/Src/FluentAssertions/CallerIdentification/StatementParser.cs @@ -4,15 +4,14 @@ namespace FluentAssertions.CallerIdentification; -// REFACTOR: This is not a builder, but a parser, so rename it accordingly. -internal class CallerStatementBuilder +internal class StatementParser { private readonly StringBuilder statement; private readonly List parsingStrategies; private readonly List candidates = new(); private ParsingState state = ParsingState.InProgress; - internal CallerStatementBuilder() + internal StatementParser() { statement = new StringBuilder(); diff --git a/Src/FluentAssertions/CallerIdentifier.cs b/Src/FluentAssertions/CallerIdentifier.cs index afa39a93bb..358931da78 100644 --- a/Src/FluentAssertions/CallerIdentifier.cs +++ b/Src/FluentAssertions/CallerIdentifier.cs @@ -246,7 +246,7 @@ private static string[] GetCallerIdentifiersFrom(StackFrame frame, StreamReader line = line.Substring(Math.Min(column - 1, line.Length - 1)); } - var parser = new CallerStatementBuilder(); + var parser = new StatementParser(); do { From 34bd903a840408f5cc74fc3d9ecca94421dd4410 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 16:29:24 +0000 Subject: [PATCH 19/36] Bump Meziantou.Analyzer and Microsoft.NETFramework.ReferenceAssemblies Bumps [Meziantou.Analyzer](https://github.com/meziantou/Meziantou.Analyzer) and [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet). These dependencies needed to be updated together. Updates `Meziantou.Analyzer` from 2.0.186 to 2.0.187 - [Release notes](https://github.com/meziantou/Meziantou.Analyzer/releases) - [Commits](https://github.com/meziantou/Meziantou.Analyzer/compare/2.0.186...2.0.187) Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3 - [Commits](https://github.com/Microsoft/dotnet/commits) --- updated-dependencies: - dependency-name: Meziantou.Analyzer dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Microsoft.NETFramework.ReferenceAssemblies dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 409d83d342..311033e83a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -34,7 +34,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive From ac82b9bd19779475d6657017795b1f57973bf483 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 16:24:51 +0000 Subject: [PATCH 20/36] Bump Microsoft.NET.Test.Sdk, Microsoft.NETFramework.ReferenceAssemblies and Newtonsoft.Json Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest), [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet) and [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json). These dependencies needed to be updated together. Updates `Microsoft.NET.Test.Sdk` from 17.12.0 to 17.13.0 - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.12.0...v17.13.0) Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3 - [Commits](https://github.com/Microsoft/dotnet/commits) Updates `Newtonsoft.Json` from 13.0.3 to 13.0.1 - [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases) - [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/13.0.3...13.0.1) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.NETFramework.ReferenceAssemblies dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Newtonsoft.Json dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Tests/Approval.Tests/Approval.Tests.csproj | 2 +- Tests/FSharp.Specs/FSharp.Specs.fsproj | 2 +- Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj | 2 +- Tests/TestFrameworks/MSpec.Specs/MSpec.Specs.csproj | 2 +- Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj | 2 +- Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj | 2 +- Tests/TestFrameworks/XUnit2.Specs/XUnit2.Specs.csproj | 2 +- Tests/TestFrameworks/XUnit3.Specs/XUnit3.Specs.csproj | 2 +- Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj | 2 +- Tests/VB.Specs/VB.Specs.vbproj | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Tests/Approval.Tests/Approval.Tests.csproj b/Tests/Approval.Tests/Approval.Tests.csproj index 6d9eaceee4..791e7a7605 100644 --- a/Tests/Approval.Tests/Approval.Tests.csproj +++ b/Tests/Approval.Tests/Approval.Tests.csproj @@ -5,7 +5,7 @@ - + all diff --git a/Tests/FSharp.Specs/FSharp.Specs.fsproj b/Tests/FSharp.Specs/FSharp.Specs.fsproj index a5bcdce878..4b17da6c53 100644 --- a/Tests/FSharp.Specs/FSharp.Specs.fsproj +++ b/Tests/FSharp.Specs/FSharp.Specs.fsproj @@ -10,7 +10,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj b/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj index 4450f2c3db..94d8b7fb0b 100644 --- a/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj +++ b/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Tests/TestFrameworks/MSpec.Specs/MSpec.Specs.csproj b/Tests/TestFrameworks/MSpec.Specs/MSpec.Specs.csproj index 346aca047a..7ec6f151de 100644 --- a/Tests/TestFrameworks/MSpec.Specs/MSpec.Specs.csproj +++ b/Tests/TestFrameworks/MSpec.Specs/MSpec.Specs.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj b/Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj index d075613994..89a93dede5 100644 --- a/Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj +++ b/Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj b/Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj index 75dd07d7a1..56fce6a867 100644 --- a/Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj +++ b/Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/Tests/TestFrameworks/XUnit2.Specs/XUnit2.Specs.csproj b/Tests/TestFrameworks/XUnit2.Specs/XUnit2.Specs.csproj index a675828fc8..d53fd12997 100644 --- a/Tests/TestFrameworks/XUnit2.Specs/XUnit2.Specs.csproj +++ b/Tests/TestFrameworks/XUnit2.Specs/XUnit2.Specs.csproj @@ -11,7 +11,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/Tests/TestFrameworks/XUnit3.Specs/XUnit3.Specs.csproj b/Tests/TestFrameworks/XUnit3.Specs/XUnit3.Specs.csproj index b5a1275982..d98ecf1f3a 100644 --- a/Tests/TestFrameworks/XUnit3.Specs/XUnit3.Specs.csproj +++ b/Tests/TestFrameworks/XUnit3.Specs/XUnit3.Specs.csproj @@ -8,7 +8,7 @@ - + diff --git a/Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj b/Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj index 565b679012..facac32944 100644 --- a/Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj +++ b/Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj @@ -8,7 +8,7 @@ - + diff --git a/Tests/VB.Specs/VB.Specs.vbproj b/Tests/VB.Specs/VB.Specs.vbproj index b558486990..d852640e63 100644 --- a/Tests/VB.Specs/VB.Specs.vbproj +++ b/Tests/VB.Specs/VB.Specs.vbproj @@ -6,7 +6,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive From 1823e76696858f62a5cc709d462bdc797762a0b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 16:19:16 +0000 Subject: [PATCH 21/36] Bump Microsoft.NETFramework.ReferenceAssemblies and Roslynator.Analyzers Bumps [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet) and [Roslynator.Analyzers](https://github.com/dotnet/roslynator). These dependencies needed to be updated together. Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3 - [Commits](https://github.com/Microsoft/dotnet/commits) Updates `Roslynator.Analyzers` from 4.12.11 to 4.13.0 - [Release notes](https://github.com/dotnet/roslynator/releases) - [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md) - [Commits](https://github.com/dotnet/roslynator/compare/v4.12.11...v4.13.0) --- updated-dependencies: - dependency-name: Microsoft.NETFramework.ReferenceAssemblies dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: Roslynator.Analyzers dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 311033e83a..2f23cead51 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -30,7 +30,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 4f452e1a942f84f519d07ea3f7f9636c29611aec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 18:07:32 +0000 Subject: [PATCH 22/36] Bump the xunit group with 3 updates Bumps the xunit group with 3 updates: [Verify.Xunit](https://github.com/VerifyTests/Verify), [xunit.v3.core](https://github.com/xunit/xunit) and [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet). Updates `Verify.Xunit` from 28.9.0 to 28.10.1 - [Release notes](https://github.com/VerifyTests/Verify/releases) - [Commits](https://github.com/VerifyTests/Verify/compare/28.9.0...28.10.1) Updates `xunit.v3.core` from 1.0.1 to 1.1.0 - [Commits](https://github.com/xunit/xunit/commits) Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3 - [Commits](https://github.com/Microsoft/dotnet/commits) --- updated-dependencies: - dependency-name: Verify.Xunit dependency-type: direct:production update-type: version-update:semver-minor dependency-group: xunit - dependency-name: xunit.v3.core dependency-type: direct:production update-type: version-update:semver-minor dependency-group: xunit - dependency-name: Microsoft.NETFramework.ReferenceAssemblies dependency-type: direct:production update-type: version-update:semver-patch dependency-group: xunit ... Signed-off-by: dependabot[bot] --- Tests/Approval.Tests/Approval.Tests.csproj | 2 +- Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Approval.Tests/Approval.Tests.csproj b/Tests/Approval.Tests/Approval.Tests.csproj index 791e7a7605..169d827da4 100644 --- a/Tests/Approval.Tests/Approval.Tests.csproj +++ b/Tests/Approval.Tests/Approval.Tests.csproj @@ -13,7 +13,7 @@ - + diff --git a/Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj b/Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj index facac32944..59089025d2 100644 --- a/Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj +++ b/Tests/TestFrameworks/XUnit3Core.Specs/XUnit3Core.Specs.csproj @@ -9,7 +9,7 @@ - + From 898c336fba59c883ae013619a18eab099d40421f Mon Sep 17 00:00:00 2001 From: Jonas Nyrup Date: Mon, 10 Feb 2025 20:32:12 +0100 Subject: [PATCH 23/36] ReportGenerator 5.4.1 -> 5.4.4 --- Build/_build.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/_build.csproj b/Build/_build.csproj index 1c2cc869f9..504b3f3f65 100644 --- a/Build/_build.csproj +++ b/Build/_build.csproj @@ -20,7 +20,7 @@ - + From 049b6b2dd59b93108a4490e30632a5e173da8b0d Mon Sep 17 00:00:00 2001 From: Jonas Nyrup Date: Mon, 10 Feb 2025 20:32:47 +0100 Subject: [PATCH 24/36] xunit.runner.console 2.9.2 -> 2.9.3 --- Build/_build.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/_build.csproj b/Build/_build.csproj index 504b3f3f65..548508b78a 100644 --- a/Build/_build.csproj +++ b/Build/_build.csproj @@ -21,7 +21,7 @@ - + From 5db0bc18a2ea0fb4f94472750dd335f4363aa6c1 Mon Sep 17 00:00:00 2001 From: Jonas Nyrup Date: Mon, 10 Feb 2025 20:34:12 +0100 Subject: [PATCH 25/36] Remove unused build constants --- Build/_build.csproj | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Build/_build.csproj b/Build/_build.csproj index 548508b78a..31894d6f91 100644 --- a/Build/_build.csproj +++ b/Build/_build.csproj @@ -9,15 +9,6 @@ 9.0.4 1 - - OS_WINDOWS - - - OS_LINUX - - - OS_MAC - From d56fea934dd4a7138c25f471fc7aa9b29be6583b Mon Sep 17 00:00:00 2001 From: Jonas Nyrup Date: Mon, 10 Feb 2025 21:01:55 +0100 Subject: [PATCH 26/36] Microsoft.NET.Test.Sdk 17.12.0 -> 17.13.0 --- .../FluentAssertions.Equivalency.Specs.csproj | 2 +- .../FluentAssertions.Extensibility.Specs.csproj | 2 +- Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/FluentAssertions.Equivalency.Specs/FluentAssertions.Equivalency.Specs.csproj b/Tests/FluentAssertions.Equivalency.Specs/FluentAssertions.Equivalency.Specs.csproj index d818e162a9..6437ee9643 100644 --- a/Tests/FluentAssertions.Equivalency.Specs/FluentAssertions.Equivalency.Specs.csproj +++ b/Tests/FluentAssertions.Equivalency.Specs/FluentAssertions.Equivalency.Specs.csproj @@ -21,7 +21,7 @@ - + diff --git a/Tests/FluentAssertions.Extensibility.Specs/FluentAssertions.Extensibility.Specs.csproj b/Tests/FluentAssertions.Extensibility.Specs/FluentAssertions.Extensibility.Specs.csproj index 3339b6fd79..200a3b5aa8 100644 --- a/Tests/FluentAssertions.Extensibility.Specs/FluentAssertions.Extensibility.Specs.csproj +++ b/Tests/FluentAssertions.Extensibility.Specs/FluentAssertions.Extensibility.Specs.csproj @@ -10,7 +10,7 @@ - + diff --git a/Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj b/Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj index 3ad4e54785..ac59d95b02 100644 --- a/Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj +++ b/Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj @@ -21,7 +21,7 @@ - + From 64f88501d294222b70139c7518646925e1bb3098 Mon Sep 17 00:00:00 2001 From: Jonas Nyrup Date: Mon, 10 Feb 2025 21:06:10 +0100 Subject: [PATCH 27/36] Downgrade System.Collections.Immutable again Could be related to https://github.com/dependabot/dependabot-core/issues/4075 https://github.com/dependabot/dependabot-core/issues/11398 --- .../FluentAssertions.Equivalency.Specs.csproj | 2 +- Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/FluentAssertions.Equivalency.Specs/FluentAssertions.Equivalency.Specs.csproj b/Tests/FluentAssertions.Equivalency.Specs/FluentAssertions.Equivalency.Specs.csproj index 6437ee9643..77c4b66723 100644 --- a/Tests/FluentAssertions.Equivalency.Specs/FluentAssertions.Equivalency.Specs.csproj +++ b/Tests/FluentAssertions.Equivalency.Specs/FluentAssertions.Equivalency.Specs.csproj @@ -17,7 +17,7 @@ FluentAssertions.Specs.csproj for net47 does not generate a binding redirect from 4.0.4.0 to 4.0.4.1 Upgrading to 1.6.0 gives "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0" --> - + diff --git a/Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj b/Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj index ac59d95b02..233682d337 100644 --- a/Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj +++ b/Tests/FluentAssertions.Specs/FluentAssertions.Specs.csproj @@ -17,7 +17,7 @@ FluentAssertions.Specs.csproj for net47 does not generate a binding redirect from 4.0.4.0 to 4.0.4.1 Upgrading to 1.6.0 gives "Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0" --> - + From e6b7670dca5e7b10a14e2768862d2198043e2eb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 18:08:03 +0000 Subject: [PATCH 28/36] Bump NUnit3TestAdapter from 4.6.0 to 5.0.0 in the nunit group Bumps the nunit group with 1 update: [NUnit3TestAdapter](https://github.com/nunit/nunit3-vs-adapter). Updates `NUnit3TestAdapter` from 4.6.0 to 5.0.0 - [Release notes](https://github.com/nunit/nunit3-vs-adapter/releases) - [Commits](https://github.com/nunit/nunit3-vs-adapter/compare/V4.6.0...V5.0.0) --- updated-dependencies: - dependency-name: NUnit3TestAdapter dependency-type: direct:production update-type: version-update:semver-major dependency-group: nunit ... Signed-off-by: dependabot[bot] --- Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj | 2 +- Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj b/Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj index 89a93dede5..abae2907ef 100644 --- a/Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj +++ b/Tests/TestFrameworks/NUnit3.Specs/NUnit3.Specs.csproj @@ -13,7 +13,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj b/Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj index 56fce6a867..fe9dc463b6 100644 --- a/Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj +++ b/Tests/TestFrameworks/NUnit4.Specs/NUnit4.Specs.csproj @@ -13,7 +13,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 3dd8243e396432a55dd12a74a5a548a5f085fac5 Mon Sep 17 00:00:00 2001 From: Dennis Doomen Date: Thu, 28 Nov 2024 19:20:09 +0100 Subject: [PATCH 29/36] Fixed a regression in which CompleteWithinAsync treated a canceled task as an exception. --- .../Specialized/AsyncFunctionAssertions.cs | 11 +- .../GenericAsyncFunctionAssertions.cs | 2 +- .../Specialized/TaskAssertionSpecs.cs | 78 +++++++++++ .../TaskCompletionSourceAssertionSpecs.cs | 128 ++++++++++++++++++ .../Specialized/TaskOfTAssertionSpecs.cs | 42 ++++++ docs/_pages/releases.md | 4 + 6 files changed, 258 insertions(+), 7 deletions(-) diff --git a/Src/FluentAssertions/Specialized/AsyncFunctionAssertions.cs b/Src/FluentAssertions/Specialized/AsyncFunctionAssertions.cs index 2a80ef257e..75d0fc0e64 100644 --- a/Src/FluentAssertions/Specialized/AsyncFunctionAssertions.cs +++ b/Src/FluentAssertions/Specialized/AsyncFunctionAssertions.cs @@ -60,7 +60,7 @@ public async Task> CompleteWithinAsync( if (success) { - bool completesWithinTimeout = await CompletesWithinTimeoutAsync(task, remainingTime); + bool completesWithinTimeout = await CompletesWithinTimeoutAsync(task, remainingTime, _ => Task.CompletedTask); Execute.Assertion .ForCondition(completesWithinTimeout) @@ -97,7 +97,7 @@ public async Task> NotCompleteWithinAsync( if (remainingTime >= TimeSpan.Zero) { - bool completesWithinTimeout = await CompletesWithinTimeoutAsync(task, remainingTime); + bool completesWithinTimeout = await CompletesWithinTimeoutAsync(task, remainingTime, _ => Task.CompletedTask); Execute.Assertion .ForCondition(!completesWithinTimeout) @@ -271,7 +271,7 @@ private async Task InvokeWithInterceptionAsync(TimeSpan timeout) // Here we do not need to know whether the task completes (successfully) in timeout // or does not complete. We are only interested in the exception which is thrown, not returned. // So, we can ignore the result. - _ = await CompletesWithinTimeoutAsync(task, remainingTime); + _ = await CompletesWithinTimeoutAsync(task, remainingTime, cancelledTask => cancelledTask); } return null; @@ -431,7 +431,7 @@ private protected (TTask result, TimeSpan remainingTime) InvokeWithTimer(TimeSpa /// /// Monitors the specified task whether it completes withing the remaining time span. /// - private protected async Task CompletesWithinTimeoutAsync(Task target, TimeSpan remainingTime) + private protected async Task CompletesWithinTimeoutAsync(Task target, TimeSpan remainingTime, Func onTaskCanceled) { using var delayCancellationTokenSource = new CancellationTokenSource(); @@ -452,8 +452,7 @@ private protected async Task CompletesWithinTimeoutAsync(Task target, Time if (target.IsCanceled) { - // Rethrow the exception causing the task be canceled. - await target; + await onTaskCanceled(target); } // The monitored task is completed, we shall cancel the clock. diff --git a/Src/FluentAssertions/Specialized/GenericAsyncFunctionAssertions.cs b/Src/FluentAssertions/Specialized/GenericAsyncFunctionAssertions.cs index d389955d0e..65dc8260cb 100644 --- a/Src/FluentAssertions/Specialized/GenericAsyncFunctionAssertions.cs +++ b/Src/FluentAssertions/Specialized/GenericAsyncFunctionAssertions.cs @@ -51,7 +51,7 @@ public GenericAsyncFunctionAssertions(Func> subject, IExtractExcep if (success) { - bool completesWithinTimeout = await CompletesWithinTimeoutAsync(task, remainingTime); + bool completesWithinTimeout = await CompletesWithinTimeoutAsync(task, remainingTime, _ => Task.CompletedTask); success = Execute.Assertion .ForCondition(completesWithinTimeout) diff --git a/Tests/FluentAssertions.Specs/Specialized/TaskAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Specialized/TaskAssertionSpecs.cs index dcab1926ff..8dac3e4c20 100644 --- a/Tests/FluentAssertions.Specs/Specialized/TaskAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Specialized/TaskAssertionSpecs.cs @@ -104,6 +104,46 @@ public async Task When_task_completes_late_it_should_fail() // Assert await action.Should().ThrowAsync(); } + + [Fact] + public async Task Canceled_tasks_are_also_completed() + { + // Arrange + var timer = new FakeClock(); + var taskFactory = new TaskCompletionSource(); + + // Act + Func action = () => taskFactory + .Awaiting(t => (Task)t.Task) + .Should(timer) + .CompleteWithinAsync(100.Milliseconds()); + + taskFactory.SetCanceled(); + timer.Complete(); + + // Assert + await action.Should().NotThrowAsync(); + } + + [Fact] + public async Task Excepted_tasks_unexpectedly_completed() + { + // Arrange + var timer = new FakeClock(); + var taskFactory = new TaskCompletionSource(); + + // Act + Func action = () => taskFactory + .Awaiting(t => (Task)t.Task) + .Should(timer) + .CompleteWithinAsync(100.Milliseconds()); + + taskFactory.SetException(new OperationCanceledException()); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } } public class NotCompleteWithinAsync @@ -185,6 +225,44 @@ public async Task When_task_completes_late_it_should_succeed() // Assert await action.Should().NotThrowAsync(); } + + [Fact] + public async Task Canceled_tasks_are_also_completed() + { + // Arrange + var timer = new FakeClock(); + var taskFactory = new TaskCompletionSource(); + + // Act + Func action = () => taskFactory + .Awaiting(t => (Task)t.Task).Should(timer) + .NotCompleteWithinAsync(100.Milliseconds()); + + taskFactory.SetCanceled(); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } + + [Fact] + public async Task Excepted_tasks_unexpectedly_completed() + { + // Arrange + var timer = new FakeClock(); + var taskFactory = new TaskCompletionSource(); + + // Act + Func action = () => taskFactory + .Awaiting(t => (Task)t.Task).Should(timer) + .NotCompleteWithinAsync(100.Milliseconds()); + + taskFactory.SetException(new OperationCanceledException()); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } } public class ThrowAsync diff --git a/Tests/FluentAssertions.Specs/Specialized/TaskCompletionSourceAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Specialized/TaskCompletionSourceAssertionSpecs.cs index 087c9b2d51..a3305f33b3 100644 --- a/Tests/FluentAssertions.Specs/Specialized/TaskCompletionSourceAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Specialized/TaskCompletionSourceAssertionSpecs.cs @@ -73,6 +73,38 @@ public async Task When_it_completes_in_time_and_it_is_not_expected_it_should_fai await action.Should().ThrowAsync().WithMessage("*to not complete within*because test testArg*"); } + [Fact] + public async Task When_it_is_canceled_before_completion_and_it_is_not_expected_it_should_fail() + { + // Arrange + var subject = new TaskCompletionSource(); + var timer = new FakeClock(); + + // Act + Func action = () => subject.Should(timer).NotCompleteWithinAsync(1.Seconds()); + subject.SetCanceled(); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } + + [Fact] + public async Task When_it_throws_before_completion_and_it_is_not_expected_it_should_fail() + { + // Arrange + var subject = new TaskCompletionSource(); + var timer = new FakeClock(); + + // Act + Func action = () => subject.Should(timer).NotCompleteWithinAsync(1.Seconds()); + subject.SetException(new OperationCanceledException()); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } + [Fact] public async Task When_it_did_not_complete_in_time_and_it_is_not_expected_it_should_succeed() { @@ -115,6 +147,38 @@ public async Task When_accidentally_using_equals_it_should_throw_a_helpful_error await action.Should().ThrowAsync() .WithMessage("Equals is not part of Fluent Assertions. Did you mean CompleteWithinAsync() instead?"); } + + [Fact] + public async Task Canceled_tasks_are_also_completed() + { + // Arrange + var subject = new TaskCompletionSource(); + var timer = new FakeClock(); + + // Act + Func action = () => subject.Should(timer).CompleteWithinAsync(1.Seconds()); + subject.SetCanceled(); + timer.Complete(); + + // Assert + await action.Should().NotThrowAsync(); + } + + [Fact] + public async Task Excepted_tasks_unexpectedly_completed() + { + // Arrange + var subject = new TaskCompletionSource(); + var timer = new FakeClock(); + + // Act + Func action = () => subject.Should(timer).CompleteWithinAsync(1.Seconds()); + subject.SetException(new OperationCanceledException()); + timer.Complete(); + + // Assert + await action.Should().NotThrowAsync(); + } } #endif @@ -136,6 +200,38 @@ public async Task When_it_completes_in_time_it_should_succeed() await action.Should().NotThrowAsync(); } + [Fact] + public async Task Canceled_tasks_do_not_return_default_value() + { + // Arrange + var subject = new TaskCompletionSource(); + var timer = new FakeClock(); + + // Act + Func action = () => subject.Should(timer).CompleteWithinAsync(1.Seconds()).WithResult(false); + subject.SetCanceled(); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } + + [Fact] + public async Task Exception_throwing_tasks_do_not_cause_a_default_value_to_be_returned() + { + // Arrange + var subject = new TaskCompletionSource(); + var timer = new FakeClock(); + + // Act + Func action = () => subject.Should(timer).CompleteWithinAsync(1.Seconds()).WithResult(false); + subject.SetException(new OperationCanceledException()); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } + [Fact] public async Task When_it_completes_in_time_and_result_is_expected_it_should_succeed() { @@ -251,6 +347,38 @@ await action.Should().ThrowAsync() .WithMessage("Did not expect*to complete within*because test testArg*"); } + [Fact] + public async Task Canceled_tasks_are_also_completed() + { + // Arrange + var subject = new TaskCompletionSource(); + var timer = new FakeClock(); + + // Act + Func action = () => subject.Should(timer).NotCompleteWithinAsync(1.Seconds()); + subject.SetCanceled(); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } + + [Fact] + public async Task Excepted_tasks_unexpectedly_completed() + { + // Arrange + var subject = new TaskCompletionSource(); + var timer = new FakeClock(); + + // Act + Func action = () => subject.Should(timer).NotCompleteWithinAsync(1.Seconds()); + subject.SetException(new OperationCanceledException()); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } + [Fact] public async Task When_it_did_not_complete_in_time_and_it_is_not_expected_it_should_succeed() { diff --git a/Tests/FluentAssertions.Specs/Specialized/TaskOfTAssertionSpecs.cs b/Tests/FluentAssertions.Specs/Specialized/TaskOfTAssertionSpecs.cs index 31bd834ef8..ce7d03cb53 100644 --- a/Tests/FluentAssertions.Specs/Specialized/TaskOfTAssertionSpecs.cs +++ b/Tests/FluentAssertions.Specs/Specialized/TaskOfTAssertionSpecs.cs @@ -215,6 +215,48 @@ public async Task When_task_consumes_time_in_sync_portion_it_should_fail() // Assert await action.Should().ThrowAsync(); } + + [Fact] + public async Task Canceled_tasks_do_not_cause_a_default_value_to_be_returned() + { + // Arrange + var timer = new FakeClock(); + var taskFactory = new TaskCompletionSource(); + + // Act + Func action = () => taskFactory + .Awaiting(t => t.Task) + .Should(timer) + .CompleteWithinAsync(100.Milliseconds()) + .WithResult(0); + + taskFactory.SetCanceled(); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } + + [Fact] + public async Task Exception_throwing_tasks_do_not_cause_a_default_value_to_be_returned() + { + // Arrange + var timer = new FakeClock(); + var taskFactory = new TaskCompletionSource(); + + // Act + Func action = () => taskFactory + .Awaiting(t => t.Task) + .Should(timer) + .CompleteWithinAsync(100.Milliseconds()) + .WithResult(0); + + taskFactory.SetException(new OperationCanceledException()); + timer.Complete(); + + // Assert + await action.Should().ThrowAsync(); + } } public class NotThrowAsync diff --git a/docs/_pages/releases.md b/docs/_pages/releases.md index cf5f1a03f1..2d3f7526cb 100644 --- a/docs/_pages/releases.md +++ b/docs/_pages/releases.md @@ -9,6 +9,10 @@ sidebar: ## 7.2.0 +### Fixes + +* Fixed a regression in which `CompleteWithinAsync` treated a canceled task as an exception - [#2853](https://github.com/fluentassertions/fluentassertions/pull/2853) + ### Improvements * Improve failure message for string assertions when checking for equality - [#2307](https://github.com/fluentassertions/fluentassertions/pull/2307) * All `Should()` methods on reference types are now annotated with the `[NotNull]` attribute for a better Fluent Assertions experience when nullable reference types are enabled - [#2987](https://github.com/fluentassertions/fluentassertions/pull/2987) From 886ac059047286720504bee5c5c546c5a271b4b4 Mon Sep 17 00:00:00 2001 From: Teal Date: Fri, 14 Feb 2025 01:19:42 -0500 Subject: [PATCH 30/36] Fixed typo in introduction page that incorrectly showed result of an assertion (#3019) --- docs/_pages/introduction.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_pages/introduction.md b/docs/_pages/introduction.md index 7f673f46fa..4fcbbc3464 100644 --- a/docs/_pages/introduction.md +++ b/docs/_pages/introduction.md @@ -170,7 +170,7 @@ The above will batch the two failures, and throw an exception at the point of di E.g. Exception thrown at point of dispose contains: ```text -Expected value to be 100, but found 95 (difference of -5). +Expected value to be 10, but found 5 (difference of -5). Expected string to be "Expected" with a length of 8, but "Actual" has a length of 6, differs near "Act" (index 0). ``` @@ -255,7 +255,7 @@ using (var innerScope = new AssertionScope()) Version 7 will remain fully open-source indefinitely and receive bugfixes and other important corrections. -Versions 8 and beyond are/will be free for open-source projects and non-commercial use, but commercial use requires a [paid license](https://xceed.com/products/unit-testing/fluent-assertions/). Check out the [license page](LICENSE) for more information. +Versions 8 and beyond are/will be free for open-source projects and non-commercial use, but commercial use requires a [paid license](https://xceed.com/products/unit-testing/fluent-assertions/). Check out the [license page](LICENSE) for more information. Since Fluent Assertions 8 doesn't need any license key, there's a soft warning that is displayed for every test run. This is to remind consumers that you need a paid license for commercial use. To suppress this warning, there's a static property called `License.Accepted` that can be set to `true`. You can add the following code to your test project to automatically toggle this flag. @@ -271,4 +271,4 @@ public static class AssertionEngineInitializer License.Accepted = true; } } -``` \ No newline at end of file +``` From d75eee32d3108c739adc184735342e9a06857133 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:41:40 +0000 Subject: [PATCH 31/36] Bump Verify.Xunit from 28.10.1 to 28.11.0 in the xunit group Bumps the xunit group with 1 update: [Verify.Xunit](https://github.com/VerifyTests/Verify). Updates `Verify.Xunit` from 28.10.1 to 28.11.0 - [Release notes](https://github.com/VerifyTests/Verify/releases) - [Commits](https://github.com/VerifyTests/Verify/compare/28.10.1...28.11.0) --- updated-dependencies: - dependency-name: Verify.Xunit dependency-type: direct:production update-type: version-update:semver-minor dependency-group: xunit ... Signed-off-by: dependabot[bot] --- Tests/Approval.Tests/Approval.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Approval.Tests/Approval.Tests.csproj b/Tests/Approval.Tests/Approval.Tests.csproj index 169d827da4..7fc4bea4f2 100644 --- a/Tests/Approval.Tests/Approval.Tests.csproj +++ b/Tests/Approval.Tests/Approval.Tests.csproj @@ -13,7 +13,7 @@ - + From f46c84f1c99754f54a6c56e31de434271fbbcf41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:51:01 +0000 Subject: [PATCH 32/36] Bump TUnit from 0.10.6 to 0.13.3 Bumps [TUnit](https://github.com/thomhurst/TUnit) from 0.10.6 to 0.13.3. - [Release notes](https://github.com/thomhurst/TUnit/releases) - [Commits](https://github.com/thomhurst/TUnit/compare/v0.10.6...v0.13.3) --- updated-dependencies: - dependency-name: TUnit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj index 1f361d5650..5419262afa 100644 --- a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj +++ b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj @@ -11,7 +11,7 @@ - + From ee5d4995ba76e98cde8f6fe46d9def1e4e71378e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:43:45 +0000 Subject: [PATCH 33/36] Bump Microsoft.Testing.Extensions.CodeCoverage from 17.13.1 to 17.14.1 Bumps [Microsoft.Testing.Extensions.CodeCoverage](https://github.com/microsoft/codecoverage) from 17.13.1 to 17.14.1. - [Commits](https://github.com/microsoft/codecoverage/commits) --- updated-dependencies: - dependency-name: Microsoft.Testing.Extensions.CodeCoverage dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj index 5419262afa..bd5f7d6470 100644 --- a/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj +++ b/Tests/TestFrameworks/TUnit.Specs/TUnit.Specs.csproj @@ -13,7 +13,7 @@ - + From 09d3108fd5a1e2f5f2f627815e25f1177fb473e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:42:35 +0000 Subject: [PATCH 34/36] Bump the mstest group with 2 updates Bumps the mstest group with 2 updates: [MSTest.TestAdapter](https://github.com/microsoft/testfx) and [MSTest.TestFramework](https://github.com/microsoft/testfx). Updates `MSTest.TestAdapter` from 3.7.3 to 3.8.0 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.7.3...v3.8.0) Updates `MSTest.TestFramework` from 3.7.3 to 3.8.0 - [Release notes](https://github.com/microsoft/testfx/releases) - [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md) - [Commits](https://github.com/microsoft/testfx/compare/v3.7.3...v3.8.0) --- updated-dependencies: - dependency-name: MSTest.TestAdapter dependency-type: direct:production update-type: version-update:semver-minor dependency-group: mstest - dependency-name: MSTest.TestFramework dependency-type: direct:production update-type: version-update:semver-minor dependency-group: mstest ... Signed-off-by: dependabot[bot] --- Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj b/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj index 94d8b7fb0b..a111f720c0 100644 --- a/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj +++ b/Tests/TestFrameworks/MSTestV2.Specs/MSTestV2.Specs.csproj @@ -12,7 +12,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + + From e3693feef680a08d0f02d995270cd0833a9ff0da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Feb 2025 15:55:01 +0100 Subject: [PATCH 35/36] Bump Microsoft.NETFramework.ReferenceAssemblies, System.Collections.Immutable and System.Reflection.Metadata (#3025) * Bump Microsoft.NETFramework.ReferenceAssemblies, System.Collections.Immutable and System.Reflection.Metadata Bumps [Microsoft.NETFramework.ReferenceAssemblies](https://github.com/Microsoft/dotnet), [System.Collections.Immutable](https://github.com/dotnet/runtime) and [System.Reflection.Metadata](https://github.com/dotnet/runtime). These dependencies needed to be updated together. Updates `Microsoft.NETFramework.ReferenceAssemblies` from 1.0.3 to 1.0.3 - [Commits](https://github.com/Microsoft/dotnet/commits) Updates `System.Collections.Immutable` from 1.5.0 to 9.0.2 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/commits/v9.0.2) Updates `System.Reflection.Metadata` from 8.0.1 to 9.0.2 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v8.0.1...v9.0.2) --- updated-dependencies: - dependency-name: Microsoft.NETFramework.ReferenceAssemblies dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: System.Collections.Immutable dependency-type: direct:production update-type: version-update:semver-major - dependency-name: System.Reflection.Metadata dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * undo bumping System.Collections.Immutable --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jonas Nyrup --- Tests/Benchmarks/Benchmarks.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Benchmarks/Benchmarks.csproj b/Tests/Benchmarks/Benchmarks.csproj index 6f82f5aa8c..a5ec8efa58 100644 --- a/Tests/Benchmarks/Benchmarks.csproj +++ b/Tests/Benchmarks/Benchmarks.csproj @@ -12,6 +12,6 @@ - + From af8910f56ca8b9f898bd28b13312db091800a198 Mon Sep 17 00:00:00 2001 From: Dennis Doomen Date: Thu, 20 Feb 2025 22:24:52 +0100 Subject: [PATCH 36/36] Update releases.md --- docs/_pages/releases.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/_pages/releases.md b/docs/_pages/releases.md index d7464fb163..a6cfbbcac9 100644 --- a/docs/_pages/releases.md +++ b/docs/_pages/releases.md @@ -14,6 +14,10 @@ sidebar: * All `Should()` methods on reference types are now annotated with the `[NotNull]` attribute for a better Fluent Assertions experience when nullable reference types are enabled - [#2987](https://github.com/fluentassertions/fluentassertions/pull/2987) * Provide a toggle to suppress the soft warning that commercial use requires a paid license - [#2984](https://github.com/fluentassertions/fluentassertions/pull/2984) +## Fixes + +* Fixed a regression in which `CompleteWithinAsync` treated a canceled task as an exception - [#2853](https://github.com/fluentassertions/fluentassertions/pull/2853) + ## 8.0.0 ### License Change