refactor: Move all test projects under src/tests

This allows easier specification of test-specific msbuild properties
pull/201/head
Robert Dailey 2 years ago
parent 3823b0ec43
commit 8d2f582b38

@ -35,45 +35,4 @@
<_Parameter1>false</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<!-- TEST ONLY PROPERTIES -->
<PropertyGroup Condition="$(ProjectName.EndsWith('.Tests')) Or $(ProjectName.EndsWith('TestLibrary'))">
<IsPackable>false</IsPackable>
</PropertyGroup>
<!-- TEST ONLY PACKAGES -->
<ItemGroup Condition="$(ProjectName.EndsWith('.Tests')) Or $(ProjectName.EndsWith('TestLibrary'))">
<PackageReference Include="AgileObjects.ReadableExpressions" PrivateAssets="All" />
<PackageReference Include="AutofacContrib.NSubstitute" PrivateAssets="All" />
<PackageReference Include="AutoFixture" PrivateAssets="All" />
<PackageReference Include="AutoFixture.AutoNSubstitute" PrivateAssets="All" />
<PackageReference Include="AutoFixture.NUnit3" PrivateAssets="All" />
<PackageReference Include="coverlet.collector" PrivateAssets="All" />
<PackageReference Include="FluentAssertions" PrivateAssets="All" />
<PackageReference Include="FluentAssertions.Json" PrivateAssets="All" />
<PackageReference Include="GitHubActionsTestLogger" PrivateAssets="All" />
<PackageReference Include="Microsoft.NET.Test.Sdk" PrivateAssets="All" />
<PackageReference Include="NSubstitute" PrivateAssets="All" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" PrivateAssets="All" />
<PackageReference Include="NUnit" PrivateAssets="All" />
<PackageReference Include="NUnit.Analyzers" PrivateAssets="All" />
<PackageReference Include="NUnit3TestAdapter" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.NUnit" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.TestCorrelator" PrivateAssets="All" />
<PackageReference Include="Spectre.Console.Testing" PrivateAssets="All" />
<PackageReference Include="TestableIO.System.IO.Abstractions.Extensions" PrivateAssets="All" />
<PackageReference Include="TestableIO.System.IO.Abstractions.TestingHelpers" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="$(ProjectName.EndsWith('.Tests')) Or $(ProjectName.EndsWith('TestLibrary'))">
<Using Include="NUnit.Framework" />
<Using Include="NSubstitute" />
<Using Include="FluentAssertions" />
<Using Include="AutoFixture.NUnit3" />
<Using Include="System.IO.Abstractions.TestingHelpers" />
</ItemGroup>
<ItemGroup Condition="$(ProjectName.EndsWith('.Tests')) Or $(ProjectName.EndsWith('TestLibrary'))">
<EmbeddedResource Include="**\Data\*" />
</ItemGroup>
</Project>

@ -1,5 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Recyclarr.Common\Recyclarr.Common.csproj" />
</ItemGroup>
</Project>

@ -1,5 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Recyclarr.Common\Recyclarr.Common.csproj" />
</ItemGroup>
</Project>

@ -5,11 +5,11 @@ VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Cli", "Recyclarr.Cli\Recyclarr.Cli.csproj", "{CD5C6F99-C587-4B7C-86AE-550FA4A5594A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Cli.Tests", "Recyclarr.Cli.Tests\Recyclarr.Cli.Tests.csproj", "{217D5972-4BB7-4343-9043-C30BD9A1811E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Cli.Tests", "tests\Recyclarr.Cli.Tests\Recyclarr.Cli.Tests.csproj", "{217D5972-4BB7-4343-9043-C30BD9A1811E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TestLibrary", "Recyclarr.TestLibrary\Recyclarr.TestLibrary.csproj", "{49F28A82-468F-4C48-9A59-D41B8FE26D6E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TestLibrary", "tests\Recyclarr.TestLibrary\Recyclarr.TestLibrary.csproj", "{49F28A82-468F-4C48-9A59-D41B8FE26D6E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TestLibrary.Tests", "Recyclarr.TestLibrary.Tests\Recyclarr.TestLibrary.Tests.csproj", "{BF105B2F-8E13-48AD-BF72-DF7EFEB018B6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TestLibrary.Tests", "tests\Recyclarr.TestLibrary.Tests\Recyclarr.TestLibrary.Tests.csproj", "{BF105B2F-8E13-48AD-BF72-DF7EFEB018B6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Props", "Props", "{305C2AC5-803F-41B3-92D8-4AD2B2E3E130}"
ProjectSection(SolutionItems) = preProject
@ -21,21 +21,24 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Props", "Props", "{305C2AC5
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Common", "Recyclarr.Common\Recyclarr.Common.csproj", "{18CF1FCA-7983-4423-8B7E-4A830108C624}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Common.Tests", "Recyclarr.Common.Tests\Recyclarr.Common.Tests.csproj", "{0720939D-1CA6-43D7-BBED-F8F894C4F562}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Common.Tests", "tests\Recyclarr.Common.Tests\Recyclarr.Common.Tests.csproj", "{0720939D-1CA6-43D7-BBED-F8F894C4F562}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TrashLib.TestLibrary", "Recyclarr.TrashLib.TestLibrary\Recyclarr.TrashLib.TestLibrary.csproj", "{33226068-65E3-4890-8671-59A56BA3F6F0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TrashLib.TestLibrary", "tests\Recyclarr.TrashLib.TestLibrary\Recyclarr.TrashLib.TestLibrary.csproj", "{33226068-65E3-4890-8671-59A56BA3F6F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TrashLib", "Recyclarr.TrashLib\Recyclarr.TrashLib.csproj", "{4F6ACBA6-9A7D-487C-ACC1-787CCC90A381}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TrashLib.Tests", "Recyclarr.TrashLib.Tests\Recyclarr.TrashLib.Tests.csproj", "{A4EC7E0D-C591-4874-B9AC-EB12A96F3E83}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.TrashLib.Tests", "tests\Recyclarr.TrashLib.Tests\Recyclarr.TrashLib.Tests.csproj", "{A4EC7E0D-C591-4874-B9AC-EB12A96F3E83}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Cli.TestLibrary", "Recyclarr.Cli.TestLibrary\Recyclarr.Cli.TestLibrary.csproj", "{77D1C695-94D4-46A9-8F12-41E54AF97750}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Cli.TestLibrary", "tests\Recyclarr.Cli.TestLibrary\Recyclarr.Cli.TestLibrary.csproj", "{77D1C695-94D4-46A9-8F12-41E54AF97750}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Gui", "Recyclarr.Gui\Recyclarr.Gui.csproj", "{53EECBC0-E0EA-4D6C-925C-5DB8C42CCB85}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Common.TestLibrary", "Recyclarr.Common.TestLibrary\Recyclarr.Common.TestLibrary.csproj", "{A92321B5-2796-467B-B5A5-2BFC41167A25}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Recyclarr.Common.TestLibrary", "tests\Recyclarr.Common.TestLibrary\Recyclarr.Common.TestLibrary.csproj", "{A92321B5-2796-467B-B5A5-2BFC41167A25}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{18E17C53-F600-40AE-82C1-3CD1E547C307}"
ProjectSection(SolutionItems) = preProject
tests\Directory.Build.props = tests\Directory.Build.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

@ -0,0 +1,42 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AgileObjects.ReadableExpressions" PrivateAssets="All" />
<PackageReference Include="AutofacContrib.NSubstitute" PrivateAssets="All" />
<PackageReference Include="AutoFixture" PrivateAssets="All" />
<PackageReference Include="AutoFixture.AutoNSubstitute" PrivateAssets="All" />
<PackageReference Include="AutoFixture.NUnit3" PrivateAssets="All" />
<PackageReference Include="coverlet.collector" PrivateAssets="All" />
<PackageReference Include="FluentAssertions" PrivateAssets="All" />
<PackageReference Include="FluentAssertions.Json" PrivateAssets="All" />
<PackageReference Include="GitHubActionsTestLogger" PrivateAssets="All" />
<PackageReference Include="Microsoft.NET.Test.Sdk" PrivateAssets="All" />
<PackageReference Include="NSubstitute" PrivateAssets="All" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" PrivateAssets="All" />
<PackageReference Include="NUnit" PrivateAssets="All" />
<PackageReference Include="NUnit.Analyzers" PrivateAssets="All" />
<PackageReference Include="NUnit3TestAdapter" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.NUnit" PrivateAssets="All" />
<PackageReference Include="Serilog.Sinks.TestCorrelator" PrivateAssets="All" />
<PackageReference Include="Spectre.Console.Testing" PrivateAssets="All" />
<PackageReference Include="TestableIO.System.IO.Abstractions.Extensions" PrivateAssets="All" />
<PackageReference Include="TestableIO.System.IO.Abstractions.TestingHelpers" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<Using Include="NUnit.Framework" />
<Using Include="NSubstitute" />
<Using Include="FluentAssertions" />
<Using Include="AutoFixture.NUnit3" />
<Using Include="System.IO.Abstractions.TestingHelpers" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="**\Data\*" />
</ItemGroup>
</Project>

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Recyclarr.Common.TestLibrary\Recyclarr.Common.TestLibrary.csproj" />
<ProjectReference Include="..\Recyclarr.Cli\Recyclarr.Cli.csproj" />
<ProjectReference Include="..\..\Recyclarr.Cli\Recyclarr.Cli.csproj" />
<ProjectReference Include="..\Recyclarr.TestLibrary\Recyclarr.TestLibrary.csproj" />
<ProjectReference Include="..\Recyclarr.TrashLib.TestLibrary\Recyclarr.TrashLib.TestLibrary.csproj" />
</ItemGroup>

@ -2,7 +2,7 @@
<ItemGroup>
<ProjectReference Include="..\Recyclarr.Cli.TestLibrary\Recyclarr.Cli.TestLibrary.csproj" />
<ProjectReference Include="..\Recyclarr.TestLibrary\Recyclarr.TestLibrary.csproj" />
<ProjectReference Include="..\Recyclarr.Cli\Recyclarr.Cli.csproj" />
<ProjectReference Include="..\..\Recyclarr.Cli\Recyclarr.Cli.csproj" />
<ProjectReference Include="..\Recyclarr.TrashLib.TestLibrary\Recyclarr.TrashLib.TestLibrary.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\..\Recyclarr.Common\Recyclarr.Common.csproj" />
</ItemGroup>
</Project>

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Recyclarr.TestLibrary\Recyclarr.TestLibrary.csproj" />
<ProjectReference Include="..\Recyclarr.Common\Recyclarr.Common.csproj" />
<ProjectReference Include="..\..\Recyclarr.Common\Recyclarr.Common.csproj" />
</ItemGroup>
<ItemGroup>

@ -0,0 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\..\Recyclarr.Common\Recyclarr.Common.csproj" />
</ItemGroup>
</Project>

@ -2,7 +2,7 @@
<ItemGroup>
<ProjectReference Include="..\Recyclarr.Common.TestLibrary\Recyclarr.Common.TestLibrary.csproj" />
<ProjectReference Include="..\Recyclarr.TestLibrary\Recyclarr.TestLibrary.csproj" />
<ProjectReference Include="..\Recyclarr.TrashLib\Recyclarr.TrashLib.csproj" />
<ProjectReference Include="..\..\Recyclarr.TrashLib\Recyclarr.TrashLib.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper.Collection" />

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save