Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 2689dc4

Browse files
committed
Add NUnitLite for Linux .NET Core tests
1 parent ac37ff6 commit 2689dc4

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

tests/ServiceStack.Text.Tests/NetCoreTestsRunner.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//NUnitLite isn't recognized in VS2017 - shouldn't need NUnitLite with NUnit 3.5+ https://github.com/nunit/dotnet-test-nunit
2-
#if false
2+
#if NUNITLITE
33
using NUnitLite;
44
using NUnit.Common;
55
using System.Reflection;

tests/ServiceStack.Text.Tests/ServiceStack.Text.Tests.csproj

+13
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@
5454
<DefineConstants>$(DefineConstants);NETCORE_SUPPORT;NETCORE</DefineConstants>
5555
</PropertyGroup>
5656

57+
<!-- Enable NunitLite build, becase NUnit is not supported on .NET Core SDK 1.0.2
58+
https://github.com/nunit/dotnet-test-nunit/issues/91
59+
To enable NUnitLite pass /p:NUNITLITE=1 into msbuild arguments
60+
-->
61+
<PropertyGroup Condition=" '$(NUNITLITE)' != '' ">
62+
<OutputType>Exe</OutputType>
63+
<DefineConstants>$(DefineConstants);NUNITLITE</DefineConstants>
64+
</PropertyGroup>
65+
66+
<ItemGroup Condition=" '$(NUNITLITE)' != '' ">
67+
<PackageReference Include="NUnitLite" Version="3.6.1" />
68+
</ItemGroup>
69+
5770
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
5871
<PackageReference Include="Microsoft.NETCore.Portable.Compatibility" Version="1.0.1" />
5972
<PackageReference Include="Microsoft.Extensions.Primitives" Version="1.*" />

0 commit comments

Comments
 (0)