Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 7e49c44

Browse files
committed
Update test projects to SDK csproj format.
Also - Removed more unnecessary dependencies - Moved a couple of tests to the right project - Removed `GitHub.Primitives.UnitTests` as it was testing stuff in `GitHub.Exports`, so moved to `GitHub.Exports.UnitTests`
1 parent bce1750 commit 7e49c44

File tree

36 files changed

+175
-2526
lines changed

36 files changed

+175
-2526
lines changed

GitHubVS.sln

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.VisualStudio.UI", "s
9797
EndProject
9898
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.StartPage", "src\GitHub.StartPage\GitHub.StartPage.csproj", "{50E277B8-8580-487A-8F8E-5C3B9FBF0F77}"
9999
EndProject
100-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.UI.UnitTests", "test\GitHub.UI.UnitTests\GitHub.UI.UnitTests.csproj", "{110B206F-8554-4B51-BF86-94DAA32F5E26}"
100+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.UI.UnitTests", "test\GitHub.UI.UnitTests\GitHub.UI.UnitTests.csproj", "{110B206F-8554-4B51-BF86-94DAA32F5E26}"
101101
EndProject
102102
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.InlineReviews", "src\GitHub.InlineReviews\GitHub.InlineReviews.csproj", "{7F5ED78B-74A3-4406-A299-70CFB5885B8B}"
103103
EndProject
104-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.InlineReviews.UnitTests", "test\GitHub.InlineReviews.UnitTests\GitHub.InlineReviews.UnitTests.csproj", "{17EB676B-BB91-48B5-AA59-C67695C647C2}"
104+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.InlineReviews.UnitTests", "test\GitHub.InlineReviews.UnitTests\GitHub.InlineReviews.UnitTests.csproj", "{17EB676B-BB91-48B5-AA59-C67695C647C2}"
105105
EndProject
106106
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Logging", "src\GitHub.Logging\GitHub.Logging.csproj", "{8D73575A-A89F-47CC-B153-B47DD06837F0}"
107107
EndProject
@@ -113,21 +113,19 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetricsServer", "test\Metri
113113
EndProject
114114
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetricsTests", "test\MetricsTests\MetricsTests\MetricsTests.csproj", "{09313E65-7ADB-48C1-AD3A-572020C5BDCB}"
115115
EndProject
116-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Api.UnitTests", "test\GitHub.Api.UnitTests\GitHub.Api.UnitTests.csproj", "{EFDE0798-ACDB-431D-B7F1-548A7231C853}"
116+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Api.UnitTests", "test\GitHub.Api.UnitTests\GitHub.Api.UnitTests.csproj", "{EFDE0798-ACDB-431D-B7F1-548A7231C853}"
117117
EndProject
118-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.App.UnitTests", "test\GitHub.App.UnitTests\GitHub.App.UnitTests.csproj", "{3525D819-6AEC-4879-89FB-56B41F026571}"
118+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.App.UnitTests", "test\GitHub.App.UnitTests\GitHub.App.UnitTests.csproj", "{3525D819-6AEC-4879-89FB-56B41F026571}"
119119
EndProject
120-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Exports.UnitTests", "test\GitHub.Exports.UnitTests\GitHub.Exports.UnitTests.csproj", "{94509FCB-6C97-4ED6-AED6-6E74AB3CA336}"
120+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Exports.UnitTests", "test\GitHub.Exports.UnitTests\GitHub.Exports.UnitTests.csproj", "{94509FCB-6C97-4ED6-AED6-6E74AB3CA336}"
121121
EndProject
122-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Exports.Reactive.UnitTests", "test\GitHub.Exports.Reactive.UnitTests\GitHub.Exports.Reactive.UnitTests.csproj", "{C59868FC-D8BC-4D47-B4F3-16908D2641C6}"
122+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Exports.Reactive.UnitTests", "test\GitHub.Exports.Reactive.UnitTests\GitHub.Exports.Reactive.UnitTests.csproj", "{C59868FC-D8BC-4D47-B4F3-16908D2641C6}"
123123
EndProject
124-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Extensions.UnitTests", "test\GitHub.Extensions.UnitTests\GitHub.Extensions.UnitTests.csproj", "{DE704BBB-6EC6-4173-B695-D9EBF5AEB092}"
124+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.Extensions.UnitTests", "test\GitHub.Extensions.UnitTests\GitHub.Extensions.UnitTests.csproj", "{DE704BBB-6EC6-4173-B695-D9EBF5AEB092}"
125125
EndProject
126-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.Primitives.UnitTests", "test\GitHub.Primitives.UnitTests\GitHub.Primitives.UnitTests.csproj", "{E687457A-BEDC-422D-8D9D-2DA58099EBBA}"
126+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.TeamFoundation.UnitTests", "test\GitHub.TeamFoundation.UnitTests\GitHub.TeamFoundation.UnitTests.csproj", "{93778A89-3E58-4853-B772-948EBB3F17BE}"
127127
EndProject
128-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.TeamFoundation.UnitTests", "test\GitHub.TeamFoundation.UnitTests\GitHub.TeamFoundation.UnitTests.csproj", "{93778A89-3E58-4853-B772-948EBB3F17BE}"
129-
EndProject
130-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHub.VisualStudio.UnitTests", "test\GitHub.VisualStudio.UnitTests\GitHub.VisualStudio.UnitTests.csproj", "{8B14F90B-0781-465D-AB94-19C8C56E3A94}"
128+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GitHub.VisualStudio.UnitTests", "test\GitHub.VisualStudio.UnitTests\GitHub.VisualStudio.UnitTests.csproj", "{8B14F90B-0781-465D-AB94-19C8C56E3A94}"
131129
EndProject
132130
Global
133131
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -498,16 +496,6 @@ Global
498496
{DE704BBB-6EC6-4173-B695-D9EBF5AEB092}.Release|Any CPU.Build.0 = Release|Any CPU
499497
{DE704BBB-6EC6-4173-B695-D9EBF5AEB092}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU
500498
{DE704BBB-6EC6-4173-B695-D9EBF5AEB092}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU
501-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
502-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
503-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU
504-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.DebugCodeAnalysis|Any CPU.Build.0 = Debug|Any CPU
505-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.DebugWithoutVsix|Any CPU.ActiveCfg = Debug|Any CPU
506-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.DebugWithoutVsix|Any CPU.Build.0 = Debug|Any CPU
507-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
508-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.Release|Any CPU.Build.0 = Release|Any CPU
509-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.ReleaseWithoutVsix|Any CPU.ActiveCfg = Release|Any CPU
510-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA}.ReleaseWithoutVsix|Any CPU.Build.0 = Release|Any CPU
511499
{93778A89-3E58-4853-B772-948EBB3F17BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
512500
{93778A89-3E58-4853-B772-948EBB3F17BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
513501
{93778A89-3E58-4853-B772-948EBB3F17BE}.DebugCodeAnalysis|Any CPU.ActiveCfg = Debug|Any CPU
@@ -558,7 +546,6 @@ Global
558546
{94509FCB-6C97-4ED6-AED6-6E74AB3CA336} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
559547
{C59868FC-D8BC-4D47-B4F3-16908D2641C6} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
560548
{DE704BBB-6EC6-4173-B695-D9EBF5AEB092} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
561-
{E687457A-BEDC-422D-8D9D-2DA58099EBBA} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
562549
{93778A89-3E58-4853-B772-948EBB3F17BE} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
563550
{8B14F90B-0781-465D-AB94-19C8C56E3A94} = {8A7DA2E7-262B-4581-807A-1C45CE79CDFD}
564551
EndGlobalSection
Lines changed: 10 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\..\packages\NUnit.3.10.1\build\NUnit.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
42
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{EFDE0798-ACDB-431D-B7F1-548A7231C853}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>GitHub.Api.UnitTests</RootNamespace>
11-
<AssemblyName>GitHub.Api.UnitTests</AssemblyName>
12-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
15-
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
16-
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
17-
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
18-
<IsCodedUITest>False</IsCodedUITest>
19-
<TestProjectType>UnitTest</TestProjectType>
20-
<NuGetPackageImportStamp>
21-
</NuGetPackageImportStamp>
3+
<TargetFramework>net461</TargetFramework>
224
</PropertyGroup>
23-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
24-
<DebugSymbols>true</DebugSymbols>
25-
<DebugType>full</DebugType>
26-
<Optimize>false</Optimize>
27-
<OutputPath>bin\Debug\</OutputPath>
28-
<DefineConstants>DEBUG;TRACE</DefineConstants>
29-
<ErrorReport>prompt</ErrorReport>
30-
<WarningLevel>4</WarningLevel>
31-
</PropertyGroup>
32-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
33-
<DebugType>pdbonly</DebugType>
34-
<Optimize>true</Optimize>
35-
<OutputPath>bin\Release\</OutputPath>
36-
<DefineConstants>TRACE</DefineConstants>
37-
<ErrorReport>prompt</ErrorReport>
38-
<WarningLevel>4</WarningLevel>
39-
</PropertyGroup>
40-
<ItemGroup>
41-
<Reference Include="LibGit2Sharp, Version=0.23.1.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
42-
<HintPath>..\..\packages\LibGit2Sharp.0.23.1\lib\net40\LibGit2Sharp.dll</HintPath>
43-
<Private>True</Private>
44-
</Reference>
45-
<Reference Include="Microsoft.VisualStudio.Text.Data, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
46-
<HintPath>..\..\packages\Microsoft.VisualStudio.Text.Data.14.3.25407\lib\net45\Microsoft.VisualStudio.Text.Data.dll</HintPath>
47-
<Private>False</Private>
48-
</Reference>
49-
<Reference Include="Microsoft.VisualStudio.Text.Logic, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
50-
<HintPath>..\..\packages\Microsoft.VisualStudio.Text.Logic.14.3.25407\lib\net45\Microsoft.VisualStudio.Text.Logic.dll</HintPath>
51-
<Private>True</Private>
52-
</Reference>
53-
<Reference Include="Microsoft.VisualStudio.Text.UI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
54-
<HintPath>..\..\packages\Microsoft.VisualStudio.Text.UI.14.3.25407\lib\net45\Microsoft.VisualStudio.Text.UI.dll</HintPath>
55-
<Private>True</Private>
56-
</Reference>
57-
<Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
58-
<HintPath>..\..\packages\Microsoft.VisualStudio.Text.UI.Wpf.14.3.25407\lib\net45\Microsoft.VisualStudio.Text.UI.Wpf.dll</HintPath>
59-
<Private>True</Private>
60-
</Reference>
61-
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
62-
<HintPath>..\..\packages\Microsoft.VisualStudio.TextManager.Interop.8.0.8.0.50727\lib\Microsoft.VisualStudio.TextManager.Interop.8.0.dll</HintPath>
63-
<Private>True</Private>
64-
</Reference>
65-
<Reference Include="NSubstitute, Version=2.0.3.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
66-
<HintPath>..\..\packages\NSubstitute.2.0.3\lib\net45\NSubstitute.dll</HintPath>
67-
<Private>True</Private>
68-
</Reference>
69-
<Reference Include="nunit.framework, Version=3.9.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
70-
<HintPath>..\..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll</HintPath>
71-
</Reference>
72-
<Reference Include="PresentationCore" />
73-
<Reference Include="System" />
74-
<Reference Include="System.Core" />
75-
<Reference Include="System.IO.Compression.FileSystem" />
76-
<Reference Include="System.Xaml" />
77-
<Reference Include="System.Xml" />
78-
<Reference Include="WindowsBase" />
79-
</ItemGroup>
80-
<ItemGroup>
81-
<Compile Include="..\Helpers\SplatModeDetectorSetUp.cs">
82-
<Link>SplatModeDetectorSetUp.cs</Link>
83-
</Compile>
84-
<Compile Include="..\Helpers\TestBaseClass.cs" />
85-
<Compile Include="Args.cs" />
86-
<Compile Include="LoginManagerTests.cs" />
87-
<Compile Include="Properties\AssemblyInfo.cs" />
88-
<Compile Include="SimpleApiClientFactoryTests.cs" />
89-
<Compile Include="SimpleApiClientTests.cs" />
90-
</ItemGroup>
5+
916
<ItemGroup>
92-
<ProjectReference Include="..\..\submodules\octokit.net\Octokit\Octokit.csproj">
93-
<Project>{08dd4305-7787-4823-a53f-4d0f725a07f3}</Project>
94-
<Name>Octokit</Name>
95-
</ProjectReference>
96-
<ProjectReference Include="..\..\submodules\splat\Splat\Splat-Net45.csproj">
97-
<Project>{252ce1c2-027a-4445-a3c2-e4d6c80a935a}</Project>
98-
<Name>Splat-Net45</Name>
99-
</ProjectReference>
100-
<ProjectReference Include="..\..\src\GitHub.Api\GitHub.Api.csproj">
101-
<Project>{b389adaf-62cc-486e-85b4-2d8b078df763}</Project>
102-
<Name>GitHub.Api</Name>
103-
</ProjectReference>
104-
<ProjectReference Include="..\..\src\GitHub.Exports.Reactive\GitHub.Exports.Reactive.csproj">
105-
<Project>{e4ed0537-d1d9-44b6-9212-3096d7c3f7a1}</Project>
106-
<Name>GitHub.Exports.Reactive</Name>
107-
</ProjectReference>
108-
<ProjectReference Include="..\..\src\GitHub.Exports\GitHub.Exports.csproj">
109-
<Project>{9AEA02DB-02B5-409C-B0CA-115D05331A6B}</Project>
110-
<Name>GitHub.Exports</Name>
111-
</ProjectReference>
112-
<ProjectReference Include="..\..\src\GitHub.InlineReviews\GitHub.InlineReviews.csproj">
113-
<Project>{7f5ed78b-74a3-4406-a299-70cfb5885b8b}</Project>
114-
<Name>GitHub.InlineReviews</Name>
115-
</ProjectReference>
7+
<ProjectReference Include="..\..\submodules\splat\Splat\Splat-Net45.csproj" />
8+
<ProjectReference Include="..\..\src\GitHub.Exports.Reactive\GitHub.Exports.Reactive.csproj" />
9+
<ProjectReference Include="..\..\src\GitHub.Exports\GitHub.Exports.csproj" />
11610
</ItemGroup>
11+
11712
<ItemGroup>
118-
<None Include="packages.config">
119-
<SubType>Designer</SubType>
120-
</None>
13+
<PackageReference Include="NSubstitute" Version="2.0.3" />
14+
<PackageReference Include="NUnit" version="3.9.0" />
12115
</ItemGroup>
122-
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
123-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
124-
</Project>
16+
</Project>

test/GitHub.Api.UnitTests/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 35 deletions
This file was deleted.

test/GitHub.Api.UnitTests/SimpleApiClientTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
public class SimpleApiClientTests
1111
{
12-
public class TheCtor : TestBaseClass
12+
public class TheCtor
1313
{
1414
public void Throws()
1515
{

0 commit comments

Comments
 (0)