Modify dotnet-test to run testRunner for all tfms

Fixes #2506
This commit is contained in:
Pranav K 2016-04-14 15:59:11 -07:00
parent ef0ca39da1
commit 4e496c3523
36 changed files with 481 additions and 59 deletions

View file

@ -0,0 +1,55 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using Xunit;
namespace FakeTests
{
public class GivenThatIWantSomeFakeTests
{
#if NET451
[Fact]
public void NET451_succeeds()
{
Assert.True(true);
}
[Fact(Skip="Skipped for NET451")]
public void SkippedTest()
{
}
#else
[Fact]
public void NETCOREAPP_succeeds()
{
Assert.True(true);
}
[Fact(Skip="Skipped for NETCOREAPP1.0")]
public void SkippedTest()
{
}
#endif
[Fact]
public void Common_succeeds()
{
Assert.True(true);
}
[Fact]
public void Fails_IfEnvironmentVariableIsSet()
{
var shouldFail = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_TEST_SHOULD_FAIL"));
#if NET451
Assert.True(shouldFail, "Failing in NET451");
#else
Assert.True(shouldFail, "Failing in NETCOREAPP1.0");
#endif
}
}
}

View file

@ -0,0 +1,27 @@
{
"version": "1.0.0-*",
"dependencies": {
"dotnet-test-xunit": "1.0.0-rc2-162081-13",
"Microsoft.NETCore.Platforms": "1.0.1-rc2-*",
"xunit": "2.1.0"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet",
"portable-dnxcore50+net45+win8+wp8+wpa81",
"portable-net45+win8"
],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-*"
},
"System.Linq.Expressions": "4.0.11-rc2-24022",
"System.Runtime.Serialization.Primitives": "4.1.1-rc2-24022"
}
},
"net451": { }
},
"testRunner": "xunit"
}