From c6ff3a3130d3968a0c83aac82c70a28925e51651 Mon Sep 17 00:00:00 2001 From: Jonas Nyrup Date: Thu, 10 Jul 2025 16:15:58 +0200 Subject: [PATCH] Accept license for all test projects --- Tests/AcceptLicense.cs | 20 +++++++++++++++++++ Tests/Directory.Build.targets | 6 ++++++ .../AssemblyInitializer.cs | 16 --------------- 3 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 Tests/AcceptLicense.cs create mode 100644 Tests/Directory.Build.targets delete mode 100644 Tests/FluentAssertions.Specs/AssemblyInitializer.cs diff --git a/Tests/AcceptLicense.cs b/Tests/AcceptLicense.cs new file mode 100644 index 000000000..ea67dab27 --- /dev/null +++ b/Tests/AcceptLicense.cs @@ -0,0 +1,20 @@ +#pragma warning disable + +using System.Runtime.CompilerServices; +using FluentAssertions; +using FluentAssertions.Tests; + +[assembly: FluentAssertions.Extensibility.AssertionEngineInitializer( + typeof(AcceptLicence), + nameof(AcceptLicence.AcknowledgeSoftWarning))] + +namespace FluentAssertions.Tests; + +internal static class AcceptLicence +{ + public static void AcknowledgeSoftWarning() + { + // Suppress the soft warning about the license requirements for commercial use + License.Accepted = true; + } +} diff --git a/Tests/Directory.Build.targets b/Tests/Directory.Build.targets new file mode 100644 index 000000000..6b610bdb7 --- /dev/null +++ b/Tests/Directory.Build.targets @@ -0,0 +1,6 @@ + + + + + + diff --git a/Tests/FluentAssertions.Specs/AssemblyInitializer.cs b/Tests/FluentAssertions.Specs/AssemblyInitializer.cs deleted file mode 100644 index 1909a8206..000000000 --- a/Tests/FluentAssertions.Specs/AssemblyInitializer.cs +++ /dev/null @@ -1,16 +0,0 @@ -using FluentAssertions.Specs; - -[assembly: FluentAssertions.Extensibility.AssertionEngineInitializer( - typeof(AssemblyInitializer), - nameof(AssemblyInitializer.AcknowledgeSoftWarning))] - -namespace FluentAssertions.Specs; - -public static class AssemblyInitializer -{ - public static void AcknowledgeSoftWarning() - { - // Suppress the soft warning about the license requirements for commercial use - License.Accepted = true; - } -}