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

    <PropertyGroup>
        <TargetFramework>net9.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <IsPackable>false</IsPackable>
        <IsTestProject>true</IsTestProject>
        <LangVersion>13</LangVersion>
    </PropertyGroup>

    <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
      <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
      <DocumentationFile>bin\Debug\net9.0\AliasVault.E2ETests.xml</DocumentationFile>
      <DefineConstants>TRACE</DefineConstants>
    </PropertyGroup>

    <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
      <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
      <DocumentationFile>bin\Release\net9.0\AliasVault.E2ETests.xml</DocumentationFile>
      <DefineConstants>TRACE</DefineConstants>
    </PropertyGroup>

    <ItemGroup>
      <AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
      <EmbeddedResource Include="TestData\AliasClientDb_encrypted_base64_1.0.0.txt" />
      <EmbeddedResource Include="TestData\TestAttachment.txt" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
        <PackageReference Include="NUnit" Version="4.2.2" />
        <PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
        <PackageReference Include="NUnit.Analyzers" Version="4.4.0">
          <PrivateAssets>all</PrivateAssets>
          <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.Playwright.NUnit" Version="1.49.0" />
        <PackageReference Include="coverlet.collector" Version="6.0.2">
          <PrivateAssets>all</PrivateAssets>
          <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
          <PrivateAssets>all</PrivateAssets>
          <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
    </ItemGroup>

    <ItemGroup>
      <ProjectReference Include="..\..\AliasVault.Admin\AliasVault.Admin.csproj" />
      <ProjectReference Include="..\..\AliasVault.Api\AliasVault.Api.csproj" />
      <ProjectReference Include="..\..\Databases\AliasServerDb\AliasServerDb.csproj" />
      <ProjectReference Include="..\..\Utilities\AliasVault.TotpGenerator\AliasVault.TotpGenerator.csproj" />
      <ProjectReference Include="..\AliasVault.IntegrationTests\AliasVault.IntegrationTests.csproj" />
      <ProjectReference Include="..\Server\AliasVault.E2ETests.Client.Server\AliasVault.E2ETests.Client.Server.csproj" />
    </ItemGroup>

    <ItemGroup>
      <Content Include="appsettings.json">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </Content>
      <Content Include="appsettings.Development.json" Condition="Exists('appsettings.Development.json')">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      </Content>
    </ItemGroup>

</Project>
