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

    <PropertyGroup>
        <Authors>Stef Heyenrath</Authors>
        <OutputType>Exe</OutputType>
        <TargetFrameworks>net48;net8.0</TargetFrameworks>
        <Nullable>enable</Nullable>
        <IsPackable>false</IsPackable>
        <DebugType>full</DebugType>
        <AssemblyName>WireMock.Net.Tests</AssemblyName>
        <PackageId>WireMock.Net.Tests</PackageId>
        <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
        <ProjectGuid>{31DC2EF8-C3FE-467D-84BE-FB5D956E612E}</ProjectGuid>
        <IsTestProject>true</IsTestProject>
        <SonarQubeExclude>true</SonarQubeExclude>
        <SignAssembly>true</SignAssembly>
        <AssemblyOriginatorKeyFile>../../src/WireMock.Net/WireMock.Net.snk</AssemblyOriginatorKeyFile>
        <PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>

        <!--https://developercommunity.visualstudio.com/content/problem/26347/unit-tests-fail-with-fileloadexception-newtonsoftj-1.html-->
        <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
        <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
    </PropertyGroup>

    <PropertyGroup Condition=" '$(TargetFramework)' != 'net48' ">
        <DefineConstants>$(DefineConstants);TRAILINGHEADERS</DefineConstants>
    </PropertyGroup>

    <ItemGroup>
        <Compile Remove="Matchers\LinqMatcherTests.cs" />
        <Compile Remove="Util\JsonUtilsTests.cs" />
    </ItemGroup>

    <ItemGroup>
      <Compile Include="..\..\src\WireMock.Net.Testcontainers\Utils\CombineUtils.cs" Link="Testcontainers\CombineUtils.cs" />
    </ItemGroup>

    <ItemGroup>
        <!-- https://stackoverflow.com/questions/59406201/filenesting-not-working-for-class-or-shared-library-projects -->
        <ProjectCapability Include="ConfigurableFileNesting" />
        <ProjectCapability Include="ConfigurableFileNestingFeatureEnabled" />
    </ItemGroup>

    <!--<ItemGroup>
        <Compile Update="**\*.*.verified.txt">
            <DependentUpon>$([System.String]::Copy((Filename)*.cs))</DependentUpon>
        </Compile>
    </ItemGroup>-->

    <ItemGroup>
        <ProjectReference Include="..\..\src\WireMock.Net.AwesomeAssertions\WireMock.Net.AwesomeAssertions.csproj" />
        <ProjectReference Include="..\..\src\WireMock.Net.Matchers.CSharpCode\WireMock.Net.Matchers.CSharpCode.csproj" />
        <ProjectReference Include="..\..\src\WireMock.Net.RestClient\WireMock.Net.RestClient.csproj" />
        <ProjectReference Include="..\..\src\WireMock.Net.xUnit.v3\WireMock.Net.xUnit.v3.csproj" />
        <ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="Codecov" Version="1.13.0" />
        <PackageReference Include="coverlet.msbuild" Version="6.0.4">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Meziantou.Extensions.Logging.Xunit.v3" Version="1.1.23" />
        <PackageReference Include="Verify.XunitV3" Version="31.12.5" />
        <PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
        <PackageReference Include="coverlet.collector" Version="6.0.4">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Moq" Version="4.20.72" />
        <PackageReference Include="NFluent" Version="3.1.0" />
        <PackageReference Include="SimMetrics.Net" Version="1.0.5" />
        <PackageReference Include="JsonConverter.System.Text.Json" Version="0.8.0" />
        <PackageReference Include="Google.Protobuf" Version="3.33.5" />
        <PackageReference Include="Grpc.Net.Client" Version="2.76.0" />
        <PackageReference Include="Grpc.Tools" Version="2.78.0">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="xunit.v3" Version="3.2.2" />

        <Protobuf Include="Grpc\greet.proto" GrpcServices="Client" />
        <Protobuf Include="Grpc\policy.proto" GrpcServices="Client" />
    </ItemGroup>

    <ItemGroup>
        <ProjectReference Include="..\..\src\WireMock.Net.Testcontainers\WireMock.Net.Testcontainers.csproj" />
    </ItemGroup>

    <ItemGroup>
        <None Update="OpenApiParser\*.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="OpenApiParser\*.yml">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="OpenApiParser\*.yaml">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="cert.pem">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="Grpc\Test\greet.proto">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="Grpc\request.proto">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
            <!--<GrpcServices>Client</GrpcServices>-->
        </None>
        <None Update="Grpc\greet1.proto">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
            <!--<GrpcServices>Client</GrpcServices>-->
        </None>
        <None Update="Grpc\policy.proto">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
            <GrpcServices>Client</GrpcServices>
        </None>
        <None Update="Grpc\greet.proto">
            <GrpcServices>Client</GrpcServices>
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="Grpc\Test\SubFolder\request.proto">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="Grpc\ot\opentelemetry\proto\**\*.proto">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="responsebody.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="__admin\mappings.org\*.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="__admin\mappings\*.json">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="__admin\mappings\*.xml">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="__admin\mappings\*.proto">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="__admin\mappings\subdirectory\*.xml">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
        </None>
        <None Update="client_cert.pfx">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
            <DependentUpon>WireMockServerTests.ClientCertificate.cs</DependentUpon>
        </None>
    </ItemGroup>

    <ItemGroup>
        <Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
    </ItemGroup>

</Project>