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

    <PropertyGroup>
        <Authors>Stef Heyenrath</Authors>
        <TargetFrameworks>net452;net461;net6.0;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)' == 'net452' or '$(TargetFramework)' == 'net461'">
        <DefineConstants>NETFRAMEWORK</DefineConstants>
    </PropertyGroup>

    <PropertyGroup Condition="'$(TargetFramework)' != 'netstandard1.3' and '$(TargetFramework)' != 'net451' and '$(TargetFramework)' != 'net452' and '$(TargetFramework)' != 'net46' and '$(TargetFramework)' != 'net461'">
        <DefineConstants>$(DefineConstants);GRAPHQL;MIMEKIT;PROTOBUF</DefineConstants>
    </PropertyGroup>

    <PropertyGroup Condition="'$(TargetFramework)' != 'netstandard1.3' and '$(TargetFramework)' != 'net451' and '$(TargetFramework)' != 'net452' and '$(TargetFramework)' != 'net46' ">
        <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.FluentAssertions\WireMock.Net.FluentAssertions.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\WireMock.Net.xUnit.csproj" />
        <ProjectReference Include="..\..\src\WireMock.Net\WireMock.Net.csproj" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="Codecov" Version="1.13.0" />
        <PackageReference Include="coverlet.msbuild" Version="3.2.0">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="CultureAwareTesting.xUnit" Version="0.0.1" />
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
        <PackageReference Include="coverlet.collector" Version="3.2.0">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Moq" Version="4.17.2" />
        <PackageReference Include="System.Threading" Version="4.3.0" />
        <PackageReference Include="NFluent" Version="2.8.0" />
        <PackageReference Include="SimMetrics.Net" Version="1.0.5" />
        <PackageReference Include="AnyOf" Version="0.4.0" />
        <PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' == 'net452' or '$(TargetFramework)' == 'net461'">
        <PackageReference Include="Microsoft.Owin.Host.HttpListener" Version="3.1.0" />
        <PackageReference Include="System.ValueTuple" Version="4.5.0" />
        <PackageReference Include="FluentAssertions" Version="5.10.3" />
        <PackageReference Include="xunit" Version="2.4.1" />
        <PackageReference Include="xunit.core" Version="2.4.1" />
        <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' != 'net452' and '$(TargetFramework)' != 'net461'">
        <PackageReference Include="FluentAssertions" Version="6.9.0" />
        <PackageReference Include="xunit" Version="2.4.2" />
        <PackageReference Include="xunit.core" Version="2.4.2" />
        <PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>
        <PackageReference Include="Verify.Xunit" Version="19.6.0" />
    </ItemGroup>

    <ItemGroup Condition="'$(TargetFramework)' != 'net452'">
        <PackageReference Include="System.Net.Http.Json" Version="8.0.1" />
        <!--<PackageReference Include="JsonConverter.System.Text.Json" Version="0.8.0" />-->
        <PackageReference Include="Google.Protobuf" Version="3.25.1" />
        <PackageReference Include="Grpc.Net.Client" Version="2.60.0" />
        <PackageReference Include="Grpc.Tools" Version="2.60.0">
            <PrivateAssets>all</PrivateAssets>
            <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        </PackageReference>

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

    <ItemGroup Condition="'$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' or '$(TargetFramework)' == 'net8.0'">
        <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>