Skip to content

Commit

Permalink
.NET Framework & .NET 5 test projects were merged
Browse files Browse the repository at this point in the history
  • Loading branch information
AqlaSolutions committed Dec 26, 2020
1 parent 219df1d commit 2cd9295
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 126 deletions.
17 changes: 14 additions & 3 deletions RunSharp.Tests.IKVM/RunSharp.Tests.IKVM.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -11,6 +12,8 @@
<AssemblyName>RunSharp.Tests.IKVM</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -33,9 +36,8 @@
<Reference Include="IKVM.Reflection">
<HintPath>..\lib\IKVM.Reflection.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.2.12296, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -58,8 +60,17 @@
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="..\RunSharp.TestsShared\RunSharp.Tests.projitems" Label="Shared" />
<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\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
</Target>
<!-- 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">
Expand Down
4 changes: 4 additions & 0 deletions RunSharp.Tests.IKVM/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NUnit" version="3.12.0" targetFramework="net45" />
</packages>
30 changes: 0 additions & 30 deletions RunSharp.Tests.Net5/RunSharp.Tests.Net5.csproj

This file was deleted.

68 changes: 0 additions & 68 deletions RunSharp.Tests.Standard/RunSharp.Tests.Standard.csproj

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// adapted https://github.com/dotnet/runtime/blob/10381a2cdc33860f0dc649b24cbb703d23b9ea33/src/coreclr/tools/ILVerify/Program.cs

#if NET5_0
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -209,4 +211,5 @@ static void AppendExpandedPaths(Dictionary<string, string> dictionary, string pa
}
}

}
}
#endif
File renamed without changes.
25 changes: 25 additions & 0 deletions RunSharp.Tests/RunSharp.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;net5.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>9.0</LangVersion>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.ILVerification" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.12.0" />
<ProjectReference Include="..\RunSharp\RunSharp.csproj">
<SetTargetFramework Condition="'$(TargetFramework)'=='net45'">TargetFramework=net35</SetTargetFramework>
<SetTargetFramework Condition="'$(TargetFramework)'=='net5.0'">TargetFramework=netstandard2.1</SetTargetFramework>
</ProjectReference>
</ItemGroup>

<Import Project="..\RunSharp.TestsShared\RunSharp.Tests.projitems" Label="Shared" />

</Project>
7 changes: 1 addition & 6 deletions RunSharp.TestsShared/Tests/TestSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

using NUnit.Framework;
#if NET5_0
using SetUp = NUnit.Framework.OneTimeSetUpAttribute;
#else
using SetUp = NUnit.Framework.SetUpAttribute;
#endif

namespace TriAxis.RunSharp.Tests
{
[SetUpFixture]
public class TestSetup
{
[@SetUp]
[OneTimeSetUpAttribute]
public void Setup()
{
ConsoleTester.Initialize();
Expand Down
20 changes: 2 additions & 18 deletions RunSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RunSharp", "RunSharp\RunSha
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "RunSharp.TestsShared", "RunSharp.TestsShared\RunSharp.TestsShared.shproj", "{9225DF43-7709-4522-AFCA-F01DF2BF6E83}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunSharp.Tests.Standard", "RunSharp.Tests.Standard\RunSharp.Tests.Standard.csproj", "{6B5D07F1-94F2-4ADD-8931-7188B3A142BD}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunSharp.Tests", "RunSharp.Tests\RunSharp.Tests.csproj", "{6B5D07F1-94F2-4ADD-8931-7188B3A142BD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunSharp.Tests.IKVM", "RunSharp.Tests.IKVM\RunSharp.Tests.IKVM.csproj", "{D6F7CE55-853F-4E64-92C9-60C380BFB02F}"
EndProject
Expand All @@ -21,14 +21,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{6348
all.build = all.build
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RunSharp.Tests.Net5", "RunSharp.Tests.Net5\RunSharp.Tests.Net5.csproj", "{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
RunSharpShared\RunSharpShared.projitems*{08f134ae-48e8-4a35-9dc7-2f31eaf4a66f}*SharedItemsImports = 5
RunSharpShared\RunSharpShared.projitems*{1be6ac53-2c95-466e-b1d2-61e31493f169}*SharedItemsImports = 13
RunSharp.TestsShared\RunSharp.Tests.projitems*{27c94b12-f7cd-48a4-98cc-5d7f4bbae158}*SharedItemsImports = 5
RunSharp.TestsShared\RunSharp.Tests.projitems*{6b5d07f1-94f2-4add-8931-7188b3a142bd}*SharedItemsImports = 4
RunSharp.TestsShared\RunSharp.Tests.projitems*{6b5d07f1-94f2-4add-8931-7188b3a142bd}*SharedItemsImports = 5
RunSharp.TestsShared\RunSharp.Tests.projitems*{9225df43-7709-4522-afca-f01df2bf6e83}*SharedItemsImports = 13
RunSharpShared\RunSharpShared.projitems*{c835bb75-7955-4315-b52c-fa59e25219f4}*SharedItemsImports = 4
RunSharp.TestsShared\RunSharp.Tests.projitems*{d6f7ce55-853f-4e64-92c9-60c380bfb02f}*SharedItemsImports = 4
Expand Down Expand Up @@ -90,18 +87,6 @@ Global
{D6F7CE55-853F-4E64-92C9-60C380BFB02F}.Release|ARM.Build.0 = Release|Any CPU
{D6F7CE55-853F-4E64-92C9-60C380BFB02F}.Release|x86.ActiveCfg = Release|Any CPU
{D6F7CE55-853F-4E64-92C9-60C380BFB02F}.Release|x86.Build.0 = Release|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Debug|ARM.ActiveCfg = Debug|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Debug|ARM.Build.0 = Debug|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Debug|x86.ActiveCfg = Debug|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Debug|x86.Build.0 = Debug|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Release|Any CPU.Build.0 = Release|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Release|ARM.ActiveCfg = Release|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Release|ARM.Build.0 = Release|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Release|x86.ActiveCfg = Release|Any CPU
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -113,7 +98,6 @@ Global
{9225DF43-7709-4522-AFCA-F01DF2BF6E83} = {387B3677-5A8B-4FB5-9FE3-2FD884DCF39D}
{6B5D07F1-94F2-4ADD-8931-7188B3A142BD} = {387B3677-5A8B-4FB5-9FE3-2FD884DCF39D}
{D6F7CE55-853F-4E64-92C9-60C380BFB02F} = {387B3677-5A8B-4FB5-9FE3-2FD884DCF39D}
{27C94B12-F7CD-48A4-98CC-5D7F4BBAE158} = {387B3677-5A8B-4FB5-9FE3-2FD884DCF39D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {32E21FBF-9FCF-495A-B516-242725E24E21}
Expand Down

0 comments on commit 2cd9295

Please sign in to comment.