diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2f919f0..e1e8feb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,10 +19,9 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: | - 2.1.x - 3.1.x 6.0.x 8.0.x + 9.0.x - name: Run NUKE run: ./build.ps1 @@ -63,10 +62,9 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: | - 2.1.x - 3.1.x 6.0.x 8.0.x + 9.0.x - name: Run NUKE run: ./build.sh UnitTests diff --git a/.gitignore b/.gitignore index ee534ee..6d5747a 100644 --- a/.gitignore +++ b/.gitignore @@ -187,8 +187,5 @@ docs/node_modules # Documentation file needed for StyleCop.Analyzers Tests/FluentAssertions.Specs/FluentAssertions.Specs.xml -# BenchmarkDotNet -Tests/Benchmarks/BenchmarkDotNet.Artifacts/ - # Documentation spell check node_modules/ \ No newline at end of file diff --git a/Build/Build.cs b/Build/Build.cs index 7a926be..02a98a3 100644 --- a/Build/Build.cs +++ b/Build/Build.cs @@ -47,7 +47,7 @@ class Build : NukeBuild [Solution(GenerateProjects = true)] readonly Solution Solution; - [GitVersion(Framework = "net6.0", NoCache = true, NoFetch = true)] + [GitVersion(Framework = "net9.0", NoCache = true, NoFetch = true)] readonly GitVersion GitVersion; AbsolutePath ArtifactsDirectory => RootDirectory / "Artifacts"; @@ -217,7 +217,7 @@ void ReportTestOutcome(params string[] globFilters) .Executes(() => { ReportGenerator(s => s - .SetProcessToolPath(NuGetToolPathResolver.GetPackageExecutable("ReportGenerator", "ReportGenerator.dll", framework: "net6.0")) + .SetProcessToolPath(NuGetToolPathResolver.GetPackageExecutable("ReportGenerator", "ReportGenerator.dll", framework: "net9.0")) .SetTargetDirectory(TestResultsDirectory / "reports") .AddReports(TestResultsDirectory / "**/coverage.cobertura.xml") .AddReportTypes( diff --git a/Build/_build.csproj b/Build/_build.csproj index 5010523..528b865 100644 --- a/Build/_build.csproj +++ b/Build/_build.csproj @@ -1,7 +1,7 @@ Exe - net8.0 + net9.0 CS0649;CS0169 ..\ @@ -10,8 +10,8 @@ - - + + diff --git a/FluentAssertions.DataSets.sln b/FluentAssertions.DataSets.sln index 56842f7..a4467e3 100644 --- a/FluentAssertions.DataSets.sln +++ b/FluentAssertions.DataSets.sln @@ -27,8 +27,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Approval.Tests", "Tests\App EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentAssertions.DataSets.Specs", "Tests\FluentAssertions.DataSets.Specs\FluentAssertions.DataSets.Specs.csproj", "{6D31FFF8-E7FD-41D2-996C-CA8DDFDAE4FD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks", "Tests\Benchmarks\Benchmarks.csproj", "{E87CD41C-D47C-4FA7-AA4E-C1D017878830}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution CI|Any CPU = CI|Any CPU @@ -57,12 +55,6 @@ Global {6D31FFF8-E7FD-41D2-996C-CA8DDFDAE4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU {6D31FFF8-E7FD-41D2-996C-CA8DDFDAE4FD}.Release|Any CPU.ActiveCfg = Debug|Any CPU {6D31FFF8-E7FD-41D2-996C-CA8DDFDAE4FD}.Release|Any CPU.Build.0 = Debug|Any CPU - {E87CD41C-D47C-4FA7-AA4E-C1D017878830}.CI|Any CPU.ActiveCfg = Debug|Any CPU - {E87CD41C-D47C-4FA7-AA4E-C1D017878830}.CI|Any CPU.Build.0 = Debug|Any CPU - {E87CD41C-D47C-4FA7-AA4E-C1D017878830}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E87CD41C-D47C-4FA7-AA4E-C1D017878830}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E87CD41C-D47C-4FA7-AA4E-C1D017878830}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E87CD41C-D47C-4FA7-AA4E-C1D017878830}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -71,7 +63,6 @@ Global {34E3713D-C02F-4868-BBE7-47DAD2C7F03D} = {31891850-3EDC-480A-9B6C-F60540E9C90F} {F5115158-A038-4D14-A04E-46E7863E40B9} = {963262D0-9FD5-4741-8C0E-E2F34F110EF3} {6D31FFF8-E7FD-41D2-996C-CA8DDFDAE4FD} = {963262D0-9FD5-4741-8C0E-E2F34F110EF3} - {E87CD41C-D47C-4FA7-AA4E-C1D017878830} = {963262D0-9FD5-4741-8C0E-E2F34F110EF3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {75DDA3D8-9D6F-4865-93F4-DDE11DEE8290} diff --git a/README.md b/README.md index bd640b4..d8b5a9e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Extends https://www.fluentassertions.com with specialized assertions for dealing > This set of extensions was extracted from Fluent Assertions 8 and is in maintenance mode. Pull Requests will still be accepted, but we will not actively work on improvements or bugs. # Information -* Uses [Semantic Versioning](https://semver.org/lang/nl/) +* Uses [Semantic Versioning](https://semver.org/) * Uses Githubflow, so pull requests usually result in a new release * The contribution guidelines are described [here](CONTRIBUTING.md). @@ -32,10 +32,10 @@ This package is shipped as a [NuGet package](https://www.nuget.org/packages/Flue ## Prerequisites -* Visual Studio 2022 or JetBrains Rider 2021.3 -* Build Tools 2022 (including the Universal Windows Platform build tools). +* Visual Studio 2022 17.14.+ or JetBrains Rider 2024.3 +* Build Tools 2022. * .NET Framework 4.7 SDK -* .NET 8.0 SDK installed. Check the `global.json`` for the current minimum required version. +* .NET 9.0 SDK installed. Check the `global.json`` for the current minimum required version. ## Building diff --git a/Tests/Benchmarks/Benchmarks.csproj b/Tests/Benchmarks/Benchmarks.csproj deleted file mode 100644 index 8b0f426..0000000 --- a/Tests/Benchmarks/Benchmarks.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - net6;net472 - True - ..\..\Src\FluentAssertions.DataSets\FluentAssertions.snk - Exe - - - - - - - - - - ..\..\..\fluentassertions\Src\FluentAssertions\bin\Debug\net6.0\FluentAssertions.dll - - - - - - - - diff --git a/Tests/Benchmarks/LargeDataTableEquivalency.cs b/Tests/Benchmarks/LargeDataTableEquivalency.cs deleted file mode 100644 index bfae8d5..0000000 --- a/Tests/Benchmarks/LargeDataTableEquivalency.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Data; -using System.Linq; -using BenchmarkDotNet.Attributes; -using Bogus; -using FluentAssertions; -using FluentAssertions.DataSets; - -namespace Benchmarks; - -[MemoryDiagnoser] -public class LargeDataTableEquivalencyBenchmarks -{ - private DataTable dataTable1; - private DataTable dataTable2; - - [Params(10, 100, 1_000, 10_000, 100_000)] - public int RowCount { get; set; } - - [GlobalSetup] - public void GlobalSetup() - { - dataTable1 = CreateDataTable(); - dataTable2 = CreateDataTable(); - - object[] rowData = new object[dataTable1.Columns.Count]; - - var faker = new Faker - { - Random = new Randomizer(localSeed: 1) - }; - - for (int i = 0; i < RowCount; i++) - { - for (int j = 0; j < dataTable1.Columns.Count; j++) - { - Type columnType = dataTable1.Columns[j].DataType; - rowData[j] = GetData(faker, columnType); - } - - dataTable1.Rows.Add(rowData); - dataTable2.Rows.Add(rowData); - } - } - - private static object GetData(Faker faker, Type columnType) - { - return Type.GetTypeCode(columnType) switch - { - TypeCode.Empty or TypeCode.DBNull => null, - TypeCode.Boolean => faker.Random.Bool(), - TypeCode.Char => faker.Lorem.Letter().Single(), - TypeCode.SByte => faker.Random.SByte(), - TypeCode.Byte => faker.Random.Byte(), - TypeCode.Int16 => faker.Random.Short(), - TypeCode.UInt16 => faker.Random.UShort(), - TypeCode.Int32 => faker.Random.Int(), - TypeCode.UInt32 => faker.Random.UInt(), - TypeCode.Int64 => faker.Random.Long(), - TypeCode.UInt64 => faker.Random.ULong(), - TypeCode.Single => faker.Random.Float(), - TypeCode.Double => faker.Random.Double(), - TypeCode.Decimal => faker.Random.Decimal(), - TypeCode.DateTime => faker.Date.Between(DateTime.UtcNow.AddDays(-30), DateTime.UtcNow.AddDays(+30)), - TypeCode.String => faker.Lorem.Lines(1), - _ => GetDefault(faker, columnType), - }; - } - - private static object GetDefault(Faker faker, Type columnType) - { - if (columnType == typeof(TimeSpan)) - { - return faker.Date.Future() - faker.Date.Future(); - } - else if (columnType == typeof(Guid)) - { - return faker.Random.Guid(); - } - - throw new Exception("Unable to populate column of type " + columnType); - } - - private static DataTable CreateDataTable() - { - var table = new DataTable("Test"); - - table.Columns.Add("A", typeof(bool)); - table.Columns.Add("B", typeof(char)); - table.Columns.Add("C", typeof(sbyte)); - table.Columns.Add("D", typeof(byte)); - table.Columns.Add("E", typeof(short)); - table.Columns.Add("F", typeof(ushort)); - table.Columns.Add("G", typeof(int)); - table.Columns.Add("H", typeof(uint)); - table.Columns.Add("I", typeof(long)); - table.Columns.Add("J", typeof(ulong)); - table.Columns.Add("K", typeof(float)); - table.Columns.Add("L", typeof(double)); - table.Columns.Add("M", typeof(decimal)); - table.Columns.Add("N", typeof(DateTime)); - table.Columns.Add("O", typeof(string)); - table.Columns.Add("P", typeof(TimeSpan)); - table.Columns.Add("Q", typeof(Guid)); - - return table; - } - - [Benchmark] - public AndConstraint> BeEquivalentTo() => dataTable1.Should().BeEquivalentTo(dataTable2); -} diff --git a/Tests/Benchmarks/Program.cs b/Tests/Benchmarks/Program.cs deleted file mode 100644 index 8c7a7cb..0000000 --- a/Tests/Benchmarks/Program.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Globalization; -using BenchmarkDotNet.Configs; -using BenchmarkDotNet.Exporters.Csv; -using BenchmarkDotNet.Reports; -using BenchmarkDotNet.Running; -using Perfolizer.Horology; -using Perfolizer.Metrology; - -namespace Benchmarks; - -internal static class Program -{ - public static void Main() - { - var exporter = new CsvExporter( - CsvSeparator.CurrentCulture, - new SummaryStyle( - cultureInfo: CultureInfo.GetCultureInfo("nl-NL"), - printUnitsInHeader: true, - sizeUnit: SizeUnit.KB, - timeUnit: TimeUnit.Microsecond, - printUnitsInContent: false - )); - - var config = ManualConfig.CreateMinimumViable().AddExporter(exporter); - - _ = BenchmarkRunner.Run(config); - } -}