Skip to content
Closed
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
8 changes: 4 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
</PropertyGroup>

<!-- To reduce build times, we only enable analyzers for the newest TFM -->
<PropertyGroup Condition="'$(TargetFramework)' != 'net6.0'">
<PropertyGroup Condition="'$(TargetFramework)' != 'net8.0'">
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzers>false</RunAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>7.0</AnalysisLevel>
<AnalysisLevel>8.0</AnalysisLevel>
<AnalysisMode>All</AnalysisMode>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- To reduce build times, we only enable analyzers for the newest TFM -->
<PropertyGroup>
<TargetFrameworks>net47;net6.0</TargetFrameworks>
<TargetFrameworks>net47;net8.0</TargetFrameworks>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>FluentAssertions.snk</AssemblyOriginatorKeyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
8 changes: 8 additions & 0 deletions Tests/FluentAssertions.DataSets.Specs/DataSetSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ public void When_data_set_prefix_does_not_match_but_the_corresponding_property_i
dataSet1.Should().BeEquivalentTo(dataSet2, options => options.Excluding(dataSet => dataSet.Prefix));
}

#if NET8_0_OR_GREATER
[Fact(Skip = "SerializationFormat.Binary is not supported on .NET 8+")]
#else
[Fact]
#endif
public void
When_data_set_remoting_format_does_not_match_and_the_corresponding_property_is_not_excluded_equivalence_test_should_fail()
{
Expand All @@ -403,7 +407,11 @@ public void
"Expected dataSet1 to have RemotingFormat value of SerializationFormat.Binary*, but found *Xml* instead*");
}

#if NET8_0_OR_GREATER
[Fact(Skip = "SerializationFormat.Binary is not supported on .NET 8+")]
#else
[Fact]
#endif
public void
When_data_set_remoting_format_does_not_match_but_the_corresponding_property_is_excluded_equivalence_test_should_succeed()
{
Expand Down
8 changes: 8 additions & 0 deletions Tests/FluentAssertions.DataSets.Specs/DataTableSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,11 @@ public void When_data_table_prefix_does_not_match_but_the_corresponding_property
dataTable1.Should().BeEquivalentTo(dataTable2, options => options.Excluding(dataTable => dataTable.Prefix));
}

#if NET8_0_OR_GREATER
[Fact(Skip = "SerializationFormat.Binary is not supported on .NET 8+")]
#else
[Fact]
#endif
public void
When_data_table_remoting_format_does_not_match_and_the_corresponding_property_is_not_excluded_equivalence_test_should_fail()
{
Expand All @@ -541,7 +545,11 @@ public void
.WithMessage("Expected dataTable1 to have RemotingFormat value of *Binary*, but found *Xml* instead*");
}

#if NET8_0_OR_GREATER
[Fact(Skip = "SerializationFormat.Binary is not supported on .NET 8+")]
#else
[Fact]
#endif
public void
When_data_table_remoting_format_does_not_match_but_the_corresponding_property_is_excluded_equivalence_test_should_succeed()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net47;net6.0</TargetFrameworks>
<TargetFrameworks>net47;net8.0</TargetFrameworks>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Src\FluentAssertions.DataSets\FluentAssertions.snk</AssemblyOriginatorKeyFile>
<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn),IDE0052,1573,1591,1712</NoWarn>
<NoWarn>$(NoWarn),IDE0052,1573,1591,1712,SYSLIB0038</NoWarn>
<DebugType>full</DebugType>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4" PrivateAssets="all">
<PackageReference Include="coverlet.collector" Version="10.0.0" PrivateAssets="all">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions Tests/FluentAssertions.DataSets.Specs/TypedDataSetSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ public void When_Prefix_does_not_match_and_property_is_excluded_it_should_succee
dataSet1.Should().BeEquivalentTo(dataSet2, options => options.Excluding(dataSet => dataSet.Prefix));
}

#if NET8_0_OR_GREATER
[Fact(Skip = "SerializationFormat.Binary is not supported on .NET 8+")]
#else
[Fact]
#endif
public void When_RemotingFormat_does_not_match_and_property_is_not_excluded_it_should_fail()
{
// Arrange
Expand All @@ -358,7 +362,11 @@ public void When_RemotingFormat_does_not_match_and_property_is_not_excluded_it_s
action.Should().Throw<XunitException>();
}

#if NET8_0_OR_GREATER
[Fact(Skip = "SerializationFormat.Binary is not supported on .NET 8+")]
#else
[Fact]
#endif
public void When_RemotingFormat_does_not_match_and_property_is_excluded_it_should_succeed()
{
// Arrange
Expand Down
8 changes: 8 additions & 0 deletions Tests/FluentAssertions.DataSets.Specs/TypedDataTableSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,11 @@ public void When_Prefix_does_not_match_and_property_is_excluded_it_should_succee
dataTable1.Should().BeEquivalentTo(dataTable2, options => options.Excluding(dataTable => dataTable.Prefix));
}

#if NET8_0_OR_GREATER
[Fact(Skip = "SerializationFormat.Binary is not supported on .NET 8+")]
#else
[Fact]
#endif
public void When_RemotingFormat_does_not_match_and_property_is_not_excluded_it_should_fail()
{
// Arrange
Expand All @@ -410,7 +414,11 @@ public void When_RemotingFormat_does_not_match_and_property_is_not_excluded_it_s
action.Should().Throw<XunitException>();
}

#if NET8_0_OR_GREATER
[Fact(Skip = "SerializationFormat.Binary is not supported on .NET 8+")]
#else
[Fact]
#endif
public void When_RemotingFormat_does_not_match_and_property_is_excluded_it_should_succeed()
{
// Arrange
Expand Down
Loading