Skip to content

Cleanup #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions Build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,12 @@
<NukeRootDirectory>..\</NukeRootDirectory>
<NukeScriptDirectory>..\</NukeScriptDirectory>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<DefineConstants>OS_WINDOWS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
<DefineConstants>OS_LINUX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
<DefineConstants>OS_MAC</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
<PackageDownload Include="NSpec" Version="[3.1.0]" />
<PackageDownload Include="ReportGenerator" Version="[5.1.23]" />
<PackageDownload Include="xunit.runner.console" Version="[2.5.0]" />
<PackageDownload Include="Node.js.redist" Version="[16.20.0]" />
<PackageReference Include="LibGit2Sharp" Version="0.27.2" />
<PackageReference Include="Nuke.Common" Version="7.0.6" />
<PackageReference Include="Nuke.Components" Version="7.0.6" />
<PackageDownload Include="Yarn.MSBuild" Version="[1.22.19]" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion Src/FluentAssertions.DataSets/DataRowAssertions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Diagnostics;
using System.Linq;
using FluentAssertions.DataSets.Common;
using FluentAssertions.Equivalency;
using FluentAssertions.Execution;
using FluentAssertions.Primitives;

Expand Down
1 change: 0 additions & 1 deletion Src/FluentAssertions.DataSets/DataTableAssertions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Diagnostics;
using System.Linq;
using FluentAssertions.DataSets.Common;
using FluentAssertions.Equivalency;
using FluentAssertions.Execution;
using FluentAssertions.Primitives;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using FluentAssertions.Collections;
using FluentAssertions.DataSets;
using FluentAssertions.DataSets.Common;
using FluentAssertions.Execution;

// ReSharper disable once CheckNamespace
namespace FluentAssertions;
Expand Down
22 changes: 15 additions & 7 deletions Tests/FluentAssertions.DataSets.Specs/DataSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Data;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Xunit;

namespace FluentAssertions.DataSets.Specs;

Expand Down Expand Up @@ -588,17 +589,24 @@ public enum ChangeType
Removed,
}

public static IEnumerable<object[]> AllChangeTypes =>
Enum.GetValues(typeof(ChangeType)).Cast<ChangeType>().Select(t => new object[] { t });
public static TheoryData<ChangeType> AllChangeTypes =>
new(Enum.GetValues(typeof(ChangeType)).Cast<ChangeType>());

public static IEnumerable<object[]> AllChangeTypesWithAcceptChangesValues
public static TheoryData<ChangeType, bool> AllChangeTypesWithAcceptChangesValues
{
get
{
return
from changeType in Enum.GetValues(typeof(ChangeType)).Cast<ChangeType>()
from acceptChanges in new[] { true, false }
select new object[] { changeType, acceptChanges };
var result = new TheoryData<ChangeType, bool>();

foreach (var changeType in Enum.GetValues(typeof(ChangeType)).Cast<ChangeType>())
{
foreach (var acceptChanges in new[] { true, false })
{
result.Add(changeType, acceptChanges);
}
}

return result;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/FluentAssertions.DataSets.Specs/DataTableSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public void When_excluding_invalid_constraint_it_should_throw()

// Act
Action action = () => subject.Should().BeEquivalentTo(expectation, options => options
.ExcludingRelated((Constraint constraint) => new object()));
.ExcludingRelated((Constraint _) => new object()));

// Assert
action.Should().Throw<ArgumentException>().WithMessage(
Expand Down
Loading