Enale disabled vstest test. It was failing in restore.

Going with increamental approach. In this commit i am trying to enable restore. In next commit will enable vstest
This commit is contained in:
Faizan Ahmad 2016-11-01 16:18:33 +05:30
parent c0135d75be
commit 1b5497afda
2 changed files with 18 additions and 19 deletions

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<PropertyGroup> <PropertyGroup>

View file

@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests
{ {
public class VSTestTests : TestBase public class VSTestTests : TestBase
{ {
[Fact(Skip="https://github.com/dotnet/cli/issues/4526")] [Fact]
public void TestsFromAGivenContainerShouldRunWithExpectedOutput() public void TestsFromAGivenContainerShouldRunWithExpectedOutput()
{ {
// Copy DotNetCoreTestProject project in output directory of project dotnet-vstest.Tests // Copy DotNetCoreTestProject project in output directory of project dotnet-vstest.Tests
@ -30,25 +30,25 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests
.Pass(); .Pass();
// Build project VSTestDotNetCoreProject // Build project VSTestDotNetCoreProject
new BuildCommand() //new BuildCommand()
.WithWorkingDirectory(testProjectDirectory) // .WithWorkingDirectory(testProjectDirectory)
.Execute() // .Execute()
.Should() // .Should()
.Pass(); // .Pass();
// Prepare args to send vstest //// Prepare args to send vstest
string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; //string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
string testAdapterPath = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.0"); //string testAdapterPath = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.0");
string outputDll = Path.Combine(testAdapterPath, $"{testAppName}.dll"); //string outputDll = Path.Combine(testAdapterPath, $"{testAppName}.dll");
string argsForVstest = string.Concat("\"", outputDll, "\""); //string argsForVstest = string.Concat("\"", outputDll, "\"");
// Call vstest //// Call vstest
CommandResult result = new VSTestCommand().ExecuteWithCapturedOutput(argsForVstest); //CommandResult result = new VSTestCommand().ExecuteWithCapturedOutput(argsForVstest);
// Verify //// Verify
result.StdOut.Should().Contain("Total tests: 2. Passed: 1. Failed: 1. Skipped: 0."); //result.StdOut.Should().Contain("Total tests: 2. Passed: 1. Failed: 1. Skipped: 0.");
result.StdOut.Should().Contain("Passed TestNamespace.VSTestTests.VSTestPassTest"); //result.StdOut.Should().Contain("Passed TestNamespace.VSTestTests.VSTestPassTest");
result.StdOut.Should().Contain("Failed TestNamespace.VSTestTests.VSTestFailTest"); //result.StdOut.Should().Contain("Failed TestNamespace.VSTestTests.VSTestFailTest");
} }
} }
} }