From 1b5497afda3fc42319f3f1d2430a412fe0df4658 Mon Sep 17 00:00:00 2001 From: Faizan Ahmad Date: Tue, 1 Nov 2016 16:18:33 +0530 Subject: [PATCH] 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 --- .../VSTestDotNetCoreProject.csproj | 3 +- test/dotnet-vstest.Tests/VSTestTests.cs | 34 +++++++++---------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/TestAssets/TestProjects/VSTestDotNetCoreProject/VSTestDotNetCoreProject.csproj b/TestAssets/TestProjects/VSTestDotNetCoreProject/VSTestDotNetCoreProject.csproj index d0246131e..1d855c2c1 100644 --- a/TestAssets/TestProjects/VSTestDotNetCoreProject/VSTestDotNetCoreProject.csproj +++ b/TestAssets/TestProjects/VSTestDotNetCoreProject/VSTestDotNetCoreProject.csproj @@ -1,5 +1,4 @@ - - + diff --git a/test/dotnet-vstest.Tests/VSTestTests.cs b/test/dotnet-vstest.Tests/VSTestTests.cs index 29c1cdca3..5d3e46c30 100644 --- a/test/dotnet-vstest.Tests/VSTestTests.cs +++ b/test/dotnet-vstest.Tests/VSTestTests.cs @@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests { public class VSTestTests : TestBase { - [Fact(Skip="https://github.com/dotnet/cli/issues/4526")] + [Fact] public void TestsFromAGivenContainerShouldRunWithExpectedOutput() { // Copy DotNetCoreTestProject project in output directory of project dotnet-vstest.Tests @@ -30,25 +30,25 @@ namespace Microsoft.DotNet.Cli.VSTest.Tests .Pass(); // Build project VSTestDotNetCoreProject - new BuildCommand() - .WithWorkingDirectory(testProjectDirectory) - .Execute() - .Should() - .Pass(); + //new BuildCommand() + // .WithWorkingDirectory(testProjectDirectory) + // .Execute() + // .Should() + // .Pass(); - // Prepare args to send vstest - string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; - string testAdapterPath = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.0"); - string outputDll = Path.Combine(testAdapterPath, $"{testAppName}.dll"); - string argsForVstest = string.Concat("\"", outputDll, "\""); + //// Prepare args to send vstest + //string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; + //string testAdapterPath = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp1.0"); + //string outputDll = Path.Combine(testAdapterPath, $"{testAppName}.dll"); + //string argsForVstest = string.Concat("\"", outputDll, "\""); - // Call vstest - CommandResult result = new VSTestCommand().ExecuteWithCapturedOutput(argsForVstest); + //// Call vstest + //CommandResult result = new VSTestCommand().ExecuteWithCapturedOutput(argsForVstest); - // Verify - 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("Failed TestNamespace.VSTestTests.VSTestFailTest"); + //// Verify + //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("Failed TestNamespace.VSTestTests.VSTestFailTest"); } } }