Skip to content

Commit

Permalink
Make sure coverlet coverage file is generated during testing
Browse files Browse the repository at this point in the history
  • Loading branch information
davewalker5 committed Nov 28, 2024
1 parent e637897 commit 08f2703
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions src/MedicineTracker.Tests/MedicineTracker.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<!--
Displays error on console in addition to the log file. Note that this feature comes with a performance impact.
For more information, visit https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test#show-failure-per-test
-->
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
<IsPackable>false</IsPackable>
<ReleaseVersion>2.0.0.0</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
<None Remove="medications.json" />
<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" />
<None Remove="appsettings.json" />
<None Remove="medications.json" />
</ItemGroup>

<ItemGroup>
Expand All @@ -34,21 +28,26 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="17.12.6" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="1.4.0" />
<PackageReference Include="MSTest" Version="3.6.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2"><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter" Version="3.6.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.3" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MedicineTracker.BusinessLogic\MedicineTracker.BusinessLogic.csproj" />
<ProjectReference Include="..\MedicineTracker.Entities\MedicineTracker.Entities.csproj" />
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>

<ItemGroup>
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
<ProjectReference Include="..\MedicineTracker.BusinessLogic\MedicineTracker.BusinessLogic.csproj" />
<ProjectReference Include="..\MedicineTracker.Entities\MedicineTracker.Entities.csproj" />
</ItemGroup>

</Project>

0 comments on commit 08f2703

Please sign in to comment.