91 lines
No EOL
4 KiB
XML
91 lines
No EOL
4 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<TargetFramework>net10.0</TargetFramework>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
<IsPackable>false</IsPackable>
|
|
<RootNamespace>Yavsc.Tests</RootNamespace>
|
|
<UserSecretsId>78a4efec-68dc-4745-ba06-d8545ef9ee91</UserSecretsId>
|
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
|
<OutputType>exe</OutputType>
|
|
<RunSettingsFilePath>$(MSBuildProjectDirectory)\test.runsettings</RunSettingsFilePath>
|
|
<AssemblyVersion>1.0.1.0</AssemblyVersion>
|
|
<FileVersion>1.0.1.0</FileVersion>
|
|
<InformationalVersion>1.0.1-5+Branch.main.Sha.0617fc6bda7151c70559d87177e2dcfb1b60995f</InformationalVersion>
|
|
<Version>1.0.1-5</Version>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<PackageReference Include="coverlet.collector" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design">
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
<PrivateAssets>all</PrivateAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
|
<PackageReference Include="IdentityModel.OidcClient" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Hosting" />
|
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
|
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" />
|
|
<PackageReference Include="Microsoft.Extensions.Options" />
|
|
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" />
|
|
<PackageReference Include="xunit.v3" />
|
|
<PackageReference Include="xunit.v3.common" />
|
|
<PackageReference Include="xunit.v3.extensibility.core" />
|
|
<PackageReference Include="xunit.runner.visualstudio" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Content Include="appsettings.json">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Content Include="appsettings.*.json">
|
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
</Content>
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\Yavsc.Org\Yavsc.Org.csproj" />
|
|
<ProjectReference Include="..\Yavsc.Abstract\Yavsc.Abstract.csproj" />
|
|
<ProjectReference Include="..\Yavsc.Server\Yavsc.Server.csproj" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Using Include="Xunit" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" />
|
|
</ItemGroup>
|
|
<!--
|
|
MapStaticAssets() in the production pipeline resolves
|
|
{AssemblyName}.staticwebassets.endpoints.json from ContentRoot.
|
|
The referenced Yavsc.Org project produces
|
|
Yavsc.Org.staticwebassets.endpoints.json (and a runtime sibling).
|
|
Mirror them as Yavsc.Org.Tests.staticwebassets.* in the test bin
|
|
directory so the test WebApplicationFactory finds them at boot.
|
|
-->
|
|
<Target Name="CopyYavscOrgStaticAssets" AfterTargets="Build">
|
|
<PropertyGroup>
|
|
<_YavscOrgStaticAssetsDir>$(MSBuildProjectDirectory)\..\Yavsc.Org\bin\$(Configuration)\$(TargetFramework)</_YavscOrgStaticAssetsDir>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<!--
|
|
Match the SDK-generated manifest files. Each file is then
|
|
copied into the test bin with the test assembly's name as
|
|
the prefix so that the default MapStaticAssets() lookup at
|
|
{AssemblyName}.staticwebassets.endpoints.json finds them.
|
|
|
|
Example:
|
|
src : Yavsc.Org.staticwebassets.endpoints.json
|
|
dst : Yavsc.Org.Tests.staticwebassets.endpoints.json
|
|
|
|
The transform is a string replace of the source filename's
|
|
"Yavsc.Org." prefix with "Yavsc.Org.Tests." — done by the
|
|
-> '$(OutDir)Yavsc.Org.Tests.%(Filename)' transformation
|
|
with a RegexReplace on the source path.
|
|
-->
|
|
<_YavscOrgStaticAssetsFiles Include="$(_YavscOrgStaticAssetsDir)\Yavsc.Org.staticwebassets.*.json" />
|
|
</ItemGroup>
|
|
<Copy SourceFiles="@(_YavscOrgStaticAssetsFiles)" DestinationFolder="$(OutDir)" />
|
|
</Target>
|
|
<ItemGroup>
|
|
<PackageReference Include="GitVersion.MsBuild" />
|
|
</ItemGroup>
|
|
</Project> |