Skip to content

Commit

Permalink
Unify unit test projects into single project
Browse files Browse the repository at this point in the history
  • Loading branch information
jsakamoto committed Aug 17, 2020
1 parent 8a5679f commit 12107bb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 213 deletions.
37 changes: 0 additions & 37 deletions IPAddressRange.Test.Core/IPAddressRange.Test.Core.csproj

This file was deleted.

141 changes: 22 additions & 119 deletions IPAddressRange.Test/IPAddressRange.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,126 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4B6A09CA-5FFA-4C04-81F0-B5E706E3F6D3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IPRange.Test</RootNamespace>
<AssemblyName>IPRange.Test</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<TargetFrameworks>netcoreapp3.1;net45</TargetFrameworks>
<LangVersion>7.0</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<Reference Include="ChainingAssertion.MSTest, Version=1.8.1.3, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ChainingAssertion.Bin.1.8.1.3\lib\net45\ChainingAssertion.MSTest.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.XML" />
<PackageReference Include="ChainingAssertion.Bin" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="coverlet.collector" Version="1.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<Choose>
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
</ItemGroup>
</When>
<Otherwise />
</Choose>

<ItemGroup>
<Compile Include="BitsTest.cs" />
<Compile Include="IPAddressRangeDataContractSerializerTest.cs" />
<Compile Include="IPAddressRangeParseTest.cs" />
<Compile Include="IPAddressRangeJsonTest.cs" />
<Compile Include="IPAddressRangeTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<ProjectReference Include="..\IPAddressRange\IPAddressRange.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IPAddressRange\IPAddressRange.csproj">
<Project>{d3dea965-247f-4c4c-b3b0-44a039c75a5c}</Project>
<Name>IPAddressRange</Name>
</ProjectReference>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<Compile Remove="IPAddressRangeDataContractSerializerTest.cs" />
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
36 changes: 0 additions & 36 deletions IPAddressRange.Test/Properties/AssemblyInfo.cs

This file was deleted.

7 changes: 0 additions & 7 deletions IPAddressRange.Test/packages.config

This file was deleted.

16 changes: 6 additions & 10 deletions IPAddressRange.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ VisualStudioVersion = 16.0.30404.54
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IPAddressRange", "IPAddressRange\IPAddressRange.csproj", "{D3DEA965-247F-4C4C-B3B0-44A039C75A5C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPAddressRange.Test", "IPAddressRange.Test\IPAddressRange.Test.csproj", "{4B6A09CA-5FFA-4C04-81F0-B5E706E3F6D3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IPAddressRange.Test.Core", "IPAddressRange.Test.Core\IPAddressRange.Test.Core.csproj", "{6A4B647D-B2FF-41C4-81BA-9C710AFFBA42}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "README", "README", "{2377036E-5896-4E09-949F-4307D0A2F39D}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
RELEASE-NOTES.txt = RELEASE-NOTES.txt
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPAddressRange.Test", "IPAddressRange.Test\IPAddressRange.Test.csproj", "{9A01AF46-6AE0-425A-BD1E-6575122C6BAB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -26,12 +24,10 @@ Global
{D3DEA965-247F-4C4C-B3B0-44A039C75A5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3DEA965-247F-4C4C-B3B0-44A039C75A5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3DEA965-247F-4C4C-B3B0-44A039C75A5C}.Release|Any CPU.Build.0 = Release|Any CPU
{4B6A09CA-5FFA-4C04-81F0-B5E706E3F6D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B6A09CA-5FFA-4C04-81F0-B5E706E3F6D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B6A09CA-5FFA-4C04-81F0-B5E706E3F6D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A4B647D-B2FF-41C4-81BA-9C710AFFBA42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A4B647D-B2FF-41C4-81BA-9C710AFFBA42}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A4B647D-B2FF-41C4-81BA-9C710AFFBA42}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A01AF46-6AE0-425A-BD1E-6575122C6BAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A01AF46-6AE0-425A-BD1E-6575122C6BAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A01AF46-6AE0-425A-BD1E-6575122C6BAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A01AF46-6AE0-425A-BD1E-6575122C6BAB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1.0.{build}
image: Visual Studio 2017
image: Visual Studio 2019
configuration: Debug
platform: Any CPU
environment:
Expand All @@ -10,10 +10,10 @@ build:
verbosity: minimal
test_script:
- cmd: >-
cd IPAddressRange.Test.Core
cd IPAddressRange.Test
dotnet test
cd ..\IPAddressRange.Test\bin\Debug
cd ..\IPAddressRange.Test\bin\Debug\net45
vstest.console /logger:Appveyor IPRange.Test.dll
vstest.console /logger:Appveyor IPAddressRange.Test.dll

0 comments on commit 12107bb

Please sign in to comment.