This repository has been archived by the owner on Dec 24, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add temp xUnit project so we can run .NET Core unit tests in VS2017 n…
…ew msbuild format
- Loading branch information
Showing
3 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
tests/ServiceStack.Text.Tests.xUnit/ServiceStack.Text.Tests.xUnit.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |