<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>net9.0</TargetFramework>
        <IsTestProject>true</IsTestProject>
        <IsPublishable>false</IsPublishable>
        <IsPackable>false</IsPackable>
        <!-- TODO: Do not use DI in tests, create objects in-line or use mocks for externalities -->
        <NoWarn>$(NoWarn);DIMA001</NoWarn>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Bogus" Version="35.6.3" />
        <PackageReference Include="CompareNETObjects" Version="4.83.0" />
        <PackageReference Include="coverlet.collector" Version="6.0.4">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="FluentAssertions" Version="[7.2.0]" />
        <PackageReference Include="FluentAssertions.Analyzers" Version="[0.34.1]">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="MSTest" Version="3.8.3" />
        <PackageReference Include="NSubstitute" Version="5.3.0" />
    </ItemGroup>

    <ItemGroup>
        <ProjectReference Include="..\NitroxClient\NitroxClient.csproj" />
        <ProjectReference Include="..\NitroxModel\NitroxModel.csproj" />
        <ProjectReference Include="..\NitroxPatcher\NitroxPatcher.csproj" />
        <ProjectReference Include="..\NitroxServer-Subnautica\NitroxServer-Subnautica.csproj" />
        <ProjectReference Include="..\NitroxServer\NitroxServer.csproj" />
    </ItemGroup>

    <Target Name="MoveNitroxAssetsToTestOutput" AfterTargets="Build">
        <ItemGroup>
            <NitroxSubnauticaAssets Include="..\Nitrox.Assets.Subnautica\**\*." />
            <NitroxSubnauticaStaticDlls Include="..\Nitrox.Assets.Subnautica\**\*.dll" />
            <NitroxSubnauticaResources Include="..\Nitrox.Assets.Subnautica\Resources\*.*" />
            <NitroxSubnauticaLanguageFiles Include="..\Nitrox.Assets.Subnautica\LanguageFiles\*.json" />
        </ItemGroup>
        <Copy SourceFiles="@(NitroxSubnauticaAssets)" DestinationFolder="$(TargetDir)\%(RecursiveDir)" />
        <Copy SourceFiles="@(NitroxSubnauticaStaticDlls)" DestinationFolder="$(TargetDir)\lib\%(RecursiveDir)" />
        <Copy SourceFiles="@(NitroxSubnauticaLanguageFiles)" DestinationFolder="$(TargetDir)\LanguageFiles\%(RecursiveDir)" />
        <Copy SourceFiles="@(NitroxSubnauticaResources)" DestinationFolder="$(TargetDir)\Resources\%(RecursiveDir)" />
    </Target>
</Project>
