Skip to content
Open
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
4 changes: 2 additions & 2 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Taken from psake https://github.com/psake/psake
# Taken from psake https://github.com/psake/psake

<#
.SYNOPSIS
Expand Down Expand Up @@ -35,7 +35,7 @@ else {
$solution = "./AutoMapper.slnx"
}

exec { & dotnet test $solution --configuration Release --results-directory $artifacts --logger trx }
exec { & dotnet test $solution --configuration Release --results-directory $artifacts --logger trx -- RunConfiguration.TreatNoTestsAsError=true }

# Only pack AutoMapper project on Windows runners in GitHub Actions
if ($env:GITHUB_ACTIONS -eq 'true' -and $env:RUNNER_OS -eq 'Windows') {
Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="Testcontainers.MsSql" Version="4.14.0" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="xunit.v3" Version="4.0.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="4.0.1" />
<!-- Pin transitive dependency of Microsoft.Data.SqlClient to patch GHSA-2fmv-rv2c-59x7 / GHSA-846f-f764-76mx -->
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="10.0.13" />
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/AutoMapper.DI.Tests/AutoMapper.DI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>AutoMapper.Extensions.Microsoft.DependencyInjection.Tests</AssemblyName>
<PackageId>AutoMapper.Extensions.Microsoft.DependencyInjection.Tests</PackageId>
Expand All @@ -20,7 +21,7 @@
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
<PackageReference Include="Shouldly" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.v3" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion src/IntegrationTests/AutoMapper.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);618</NoWarn>
<AssemblyOriginatorKeyFile>..\..\AutoMapper.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand All @@ -11,7 +12,7 @@
<Compile Include="..\UnitTests\AutoMapperSpecBase.cs" Link="AutoMapperSpecBase.cs" />
<ProjectReference Include="..\AutoMapper\AutoMapper.csproj" />
<PackageReference Include="Testcontainers.MsSql" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.v3" />
<PackageReference Include="Shouldly" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<PackageReference Include="System.Security.Cryptography.Pkcs" />
Expand Down
19 changes: 4 additions & 15 deletions src/UnitTests/App.config
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="neutral"/>
<bindingRedirect oldVersion="2.2.8.0" newVersion="2.4.8.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup>
<appSettings>
<add key="xunit.appDomain" value="denied" />
</appSettings>
</configuration>
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup>
</configuration>
5 changes: 3 additions & 2 deletions src/UnitTests/AutoMapper.UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

<PropertyGroup>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<NoWarn>$(NoWarn);649;618</NoWarn>
<AssemblyOriginatorKeyFile>..\..\AutoMapper.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsWindows)' == 'true' ">
<PublicSign>true</PublicSign>
<TargetFrameworks>$(TargetFrameworks);net471</TargetFrameworks>
<TargetFrameworks>$(TargetFrameworks);net472</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\AutoMapper\AutoMapper.csproj" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.Testing" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.v3" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions src/UnitTests/Licensing/LicenseAccessorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ public void NonBase64UrlCharacters_LogIncompleteMessage()
ShouldLogIncompleteKey(logs, key);
}

#if !NETFRAMEWORK
// On .NET Framework the test host doesn't apply the generated binding redirects, so signature
// validation fails to load System.Threading.Tasks.Extensions before it reaches the signature check.
[Fact]
public void InvalidSignature_LogsCopyPasteHint_WithoutExceptionDetails()
{
Expand All @@ -64,7 +61,6 @@ public void InvalidSignature_LogsCopyPasteHint_WithoutExceptionDetails()
ShouldLogPlainCritical(logs, "copy the full key again");
ShouldLogDetailsAtDebug<SecurityTokenInvalidSignatureException>(logs);
}
#endif

[Fact]
public void UnparseableToken_LogsIncompleteMessage_WithoutExceptionDetails()
Expand Down