Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Refactor test related project references #10488

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
<VSTestLogger>$(VSTestLogger);html%3BLogFileName=TestResults-$(MSBuildProjectName)-$(TargetFramework)-$(RUNNER_OS).html</VSTestLogger>
</PropertyGroup>

<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)Docfx.Tests.Common/Docfx.Tests.Common.csproj" />
</ItemGroup>

<!-- Set additional PackagesReferences to suppress warning MSB3277 (Assembly version conflict) -->
<ItemGroup>
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Docfx.Build\Docfx.Build.csproj" />
<ProjectReference Include="..\..\src\Docfx.Build.ManagedReference\Docfx.Build.ManagedReference.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Docfx.Build.OverwriteDocuments\Docfx.Build.OverwriteDocuments.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
<ProjectReference Include="..\..\src\Docfx.Build\Docfx.Build.csproj" />
<ProjectReference Include="..\..\src\Docfx.Build.ManagedReference\Docfx.Build.ManagedReference.csproj" />
<ProjectReference Include="..\..\src\Docfx.Common\Docfx.Common.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
<ProjectReference Include="..\..\src\Docfx.Build.RestApi\Docfx.Build.RestApi.csproj" />
<ProjectReference Include="..\..\src\Docfx.DataContracts.Common\Docfx.DataContracts.Common.csproj" />
<ProjectReference Include="..\..\src\Docfx.DataContracts.RestApi\Docfx.DataContracts.RestApi.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
<ProjectReference Include="..\..\src\Docfx.DataContracts.Common\Docfx.DataContracts.Common.csproj" />
<ProjectReference Include="..\..\src\Docfx.Plugins\Docfx.Plugins.csproj" />
<ProjectReference Include="..\..\src\Docfx.YamlSerialization\Docfx.YamlSerialization.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
2 changes: 0 additions & 2 deletions test/Docfx.Build.Tests/Docfx.Build.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,11 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Docfx.Build.Common\Docfx.Build.Common.csproj" />
<ProjectReference Include="..\..\src\Docfx.Build.ManagedReference\Docfx.Build.ManagedReference.csproj" />
<ProjectReference Include="..\..\src\Docfx.Build.RestApi\Docfx.Build.RestApi.csproj" />
<ProjectReference Include="..\..\src\Docfx.Build.SchemaDriven\Docfx.Build.SchemaDriven.csproj" />
<ProjectReference Include="..\..\src\Docfx.Build\Docfx.Build.csproj" />
<ProjectReference Include="..\..\src\Docfx.Common\Docfx.Common.csproj" />
<ProjectReference Include="..\..\src\Docfx.DataContracts.Common\Docfx.DataContracts.Common.csproj" />
<ProjectReference Include="..\..\src\Docfx.Plugins\Docfx.Plugins.csproj" />
<ProjectReference Include="..\..\src\Docfx.YamlSerialization\Docfx.YamlSerialization.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion test/Docfx.Build.Tests/XRefMapSerializationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System.Text;
using Docfx.Common;
using Docfx.Plugins;
using FluentAssertions;
using Xunit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Docfx.Build\Docfx.Build.csproj" />
<ProjectReference Include="..\..\src\Docfx.Build.UniversalReference\Docfx.Build.UniversalReference.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
</Project>
1 change: 0 additions & 1 deletion test/Docfx.Common.Tests/Docfx.Common.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<ProjectReference Include="..\..\src\Docfx.YamlSerialization\Docfx.YamlSerialization.csproj" />
<ProjectReference Include="..\..\src\Docfx.Plugins\Docfx.Plugins.csproj" />
<ProjectReference Include="..\..\src\Docfx.Common\Docfx.Common.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion test/Docfx.Glob.Tests/Docfx.Glob.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\..\src\Docfx.Glob\Docfx.Glob.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\..\src\Docfx.Build\Docfx.Build.csproj" />
<ProjectReference Include="..\..\src\Docfx.MarkdigEngine.Extensions\Docfx.MarkdigEngine.Extensions.csproj" />
<ProjectReference Include="..\..\src\Docfx.MarkdigEngine\Docfx.MarkdigEngine.csproj" />
<ProjectReference Include="..\..\src\Docfx.Plugins\Docfx.Plugins.csproj" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion test/docfx.Tests/docfx.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@

<ItemGroup>
<ProjectReference Include="..\..\src\docfx\docfx.csproj" />
<ProjectReference Include="..\Docfx.Tests.Common\Docfx.Tests.Common.csproj" />
</ItemGroup>
</Project>
Loading