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

Commit

Permalink
Add temp xUnit project so we can run .NET Core unit tests in VS2017 n…
Browse files Browse the repository at this point in the history
…ew msbuild format
  • Loading branch information
mythz committed May 6, 2017
1 parent b9cdf9c commit 76792c2
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 1 deletion.
40 changes: 39 additions & 1 deletion src/ServiceStack.Text.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.0
VisualStudioVersion = 15.0.26403.7
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{F7FB50ED-EAFF-4839-935A-5BB4A4158245}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -24,6 +24,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.Text.Tests", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.Text.TestsConsole", "..\tests\ServiceStack.Text.TestsConsole\ServiceStack.Text.TestsConsole.csproj", "{DD3BEB33-2509-423A-8545-CE1A83684530}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.Text.Tests.xUnit", "..\tests\ServiceStack.Text.Tests.xUnit\ServiceStack.Text.Tests.xUnit.csproj", "{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -140,6 +142,42 @@ Global
{DD3BEB33-2509-423A-8545-CE1A83684530}.Signed|x86.Build.0 = Release|Any CPU
{DD3BEB33-2509-423A-8545-CE1A83684530}.Signed|Xbox 360.ActiveCfg = Release|Any CPU
{DD3BEB33-2509-423A-8545-CE1A83684530}.Signed|Xbox 360.Build.0 = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|ARM.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|x64.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|x64.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|x86.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|x86.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Debug|Xbox 360.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|Any CPU.Build.0 = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|ARM.ActiveCfg = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|ARM.Build.0 = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|x64.ActiveCfg = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|x64.Build.0 = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|x86.ActiveCfg = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|x86.Build.0 = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|Xbox 360.ActiveCfg = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Release|Xbox 360.Build.0 = Release|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|Any CPU.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|Any CPU.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|ARM.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|ARM.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|Mixed Platforms.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|x64.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|x64.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|x86.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|x86.Build.0 = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|Xbox 360.ActiveCfg = Debug|Any CPU
{1AF464DD-1F82-49D0-9FA6-516D1F2A0B4D}.Signed|Xbox 360.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
@@ -0,0 +1,46 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<OutputType>Library</OutputType>
<RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81+xamarinmac</PackageTargetFallback>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="xunit" Version="2.2.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\ServiceStack.Text\ServiceStack.Text.csproj" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<DefineConstants>$(DefineConstants);NETCORE_SUPPORT;NETCORE</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">
<PackageReference Include="Microsoft.NETCore.Portable.Compatibility" Version="1.0.1" />
<PackageReference Include="System.Drawing.Primitives" Version="4.*" />
<PackageReference Include="System.Collections.Specialized" Version="4.*" />
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.*" />
<PackageReference Include="System.Collections.NonGeneric" Version="4.*" />
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.*" />
<PackageReference Include="System.Reflection.Extensions" Version="4.*" />
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.*" />

<Reference Include="..\..\lib\netstandard1.1\ServiceStack.Interfaces.dll" />
<Reference Include="..\..\lib\netstandard1.6\ServiceStack.Client.dll" />
<Reference Include="..\..\lib\netstandard1.3\ServiceStack.Common.dll" />
<Reference Include="..\..\lib\netstandard1.6\ServiceStack.dll" />
<Reference Include="..\..\lib\netstandard1.3\Northwind.Common.dll" />
</ItemGroup>

</Project>
23 changes: 23 additions & 0 deletions tests/ServiceStack.Text.Tests.xUnit/UnitTest1.cs
@@ -0,0 +1,23 @@
using System;
using System.IO;
using ServiceStack.Web;
using Xunit;

namespace ServiceStack.Text.Tests.xUnit
{
public class RawRequest : IRequiresRequestStream
{
public Stream RequestStream { get; set; }
}

//Temporary create xUnit project to run .NET Core tests in VS2017
public class UnitTest1
{
[Fact]
public void Can_create_DTO_with_Stream()
{
var o = typeof(RawRequest).CreateInstance();
var requestObj = AutoMappingUtils.PopulateWith(o);
}
}
}

0 comments on commit 76792c2

Please sign in to comment.