This commit is contained in:
Faizan Ahmad 2016-11-02 01:56:42 +05:30
parent 0995daf83e
commit dfea5b780f
8 changed files with 27 additions and 29 deletions

View file

@ -15,18 +15,18 @@ namespace TestNamespace
{
Assert.Fail();
}
#if DESKTOP
[TestMethod]
#if DESKTOP
[TestMethod]
public void VSTestPassTestDesktop()
{
}
#else
[TestMethod]
#else
[TestMethod]
public void VSTestFailTestNetCoreApp()
{
Assert.Fail();
}
#endif
#endif
}
}

View file

@ -5,7 +5,7 @@
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netcoreapp1.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
<DefineConstants>DESKTOP;$(DefineConstants)</DefineConstants>
</PropertyGroup>
@ -13,7 +13,7 @@
<ItemGroup>
<Compile Include="**\*.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0'">
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.1</Version>
@ -25,13 +25,13 @@
<Version>1.0.0-alpha-20161026-2</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="MSTest.TestFramework">
<PackageReference Include="MSTest.TestFramework">
<Version>1.0.5-preview</Version>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter">
<PackageReference Include="MSTest.TestAdapter">
<Version>1.1.4-preview</Version>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk">
<PackageReference Include="Microsoft.NET.Test.Sdk">
<Version>15.0.0-preview-20161024-02</Version>
</PackageReference>
</ItemGroup>

View file

@ -18,13 +18,13 @@
<Version>1.0.0-alpha-20161026-2</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="MSTest.TestFramework">
<PackageReference Include="MSTest.TestFramework">
<Version>1.0.5-preview</Version>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter">
<PackageReference Include="MSTest.TestAdapter">
<Version>1.1.4-preview</Version>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk">
<PackageReference Include="Microsoft.NET.Test.Sdk">
<Version>15.0.0-preview-20161024-02</Version>
</PackageReference>
</ItemGroup>

View file

@ -5,7 +5,6 @@
<clear />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="vstest" value="https://dotnet.myget.org/F/vstest/auth/967ad631-d24c-4c0e-bece-922de3064956/api/v3/index.json" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />

View file

@ -13,20 +13,20 @@ namespace TestNamespace
[Fact]
public void VSTestXunitFailTest()
{
Assert.Equal(1,2);
Assert.Equal(1, 2);
}
#if DESKTOP
[Fact]
#if DESKTOP
[Fact]
public void VSTestXunitPassTestDesktop()
{
}
#else
[Fact]
#else
[Fact]
public void VSTestXunitFailTestNetCoreApp()
{
Assert.Equal(1,2);
Assert.Equal(1, 2);
}
#endif
#endif
}
}

View file

@ -5,7 +5,7 @@
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netcoreapp1.0</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
<DefineConstants>DESKTOP;$(DefineConstants)</DefineConstants>
</PropertyGroup>
@ -13,7 +13,7 @@
<ItemGroup>
<Compile Include="**\*.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0'">
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.1</Version>

View file

@ -5,7 +5,6 @@
<clear />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="vstest" value="https://dotnet.myget.org/F/vstest/auth/967ad631-d24c-4c0e-bece-922de3064956/api/v3/index.json" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />

View file

@ -9,11 +9,11 @@ namespace TestNamespace
public void VSTestXunitPassTest()
{
}
[Fact]
[Fact]
public void VSTestXunitFailTest()
{
Assert.Equal(1,2);
Assert.Equal(1, 2);
}
}
}