Added tests

This commit is contained in:
2026-05-29 13:37:34 +02:00
parent d387708e3a
commit b931958b16
7 changed files with 598 additions and 0 deletions
@@ -0,0 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<RootNamespace>Musify.WebApi.Tests</RootNamespace>
</PropertyGroup>
<!-- ResultHttpExtensions returns Microsoft.AspNetCore.Http.IResult, so the test project
needs the ASP.NET Core shared framework to inspect the produced result types. -->
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="FluentValidation" Version="12.1.1" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\WebApi\WebApi.csproj" />
<!-- Reuse TestDatabase / TestData helpers from the Application test project. -->
<ProjectReference Include="..\..\..\MusifyBackend\Tests\Musify.Application.Tests\Musify.Application.Tests.csproj" />
</ItemGroup>
</Project>