Merge branch 'rel/1.0.0' into test3formultipletfm

This commit is contained in:
Faizan Ahmad 2016-10-26 23:42:53 +05:30
commit c7200f1599
14 changed files with 74 additions and 18 deletions

View file

@ -39,10 +39,9 @@ namespace Microsoft.DotNet.Tests.EndToEnd
.Should()
.Pass();
//TODO: https://github.com/dotnet/sdk/issues/187 - remove framework from below.
new Run3Command()
.WithWorkingDirectory(projectDirectory)
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
.ExecuteWithCapturedOutput()
.Should()
.Pass()
.And

View file

@ -1,6 +1,7 @@
// 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.IO;
using Microsoft.DotNet.Tools.Test.Utilities;
using Xunit;
@ -29,10 +30,9 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
.Should()
.Pass();
//TODO: https://github.com/dotnet/sdk/issues/187 - remove framework from below.
new Run3Command()
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
.ExecuteWithCapturedOutput()
.Should()
.Pass()
.And
@ -54,10 +54,9 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
.Should()
.Pass();
//TODO: https://github.com/dotnet/sdk/issues/187 - remove framework from below.
new Run3Command()
.WithWorkingDirectory(testProjectDirectory)
.ExecuteWithCapturedOutput("--framework netcoreapp1.0")
.ExecuteWithCapturedOutput()
.Should()
.Pass()
.And
@ -85,7 +84,7 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
.Should()
.Pass()
.And
.HaveStdOutContaining("Hello World!");
.HaveStdOutContaining("Hello World!");
}
[Fact]
@ -113,5 +112,61 @@ namespace Microsoft.DotNet.Cli.Run3.Tests
.And
.HaveStdErrContaining("--framework");
}
[Fact]
public void It_runs_portable_apps_from_a_different_path_after_building()
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssetsManager
.CreateTestInstance(testAppName);
var testProjectDirectory = testInstance.TestRoot;
new Restore3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Should()
.Pass();
new Build3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Should()
.Pass();
string workingDirectory = Directory.GetParent(testProjectDirectory).FullName;
new Run3Command()
.WithWorkingDirectory(workingDirectory)
.ExecuteWithCapturedOutput($"--no-build --project {Path.Combine(testProjectDirectory, testAppName)}.csproj")
.Should()
.Pass()
.And
.HaveStdOutContaining("Hello World!");
}
[Fact]
public void It_runs_portable_apps_from_a_different_path_without_building()
{
var testAppName = "MSBuildTestApp";
var testInstance = TestAssetsManager
.CreateTestInstance(testAppName);
var testProjectDirectory = testInstance.TestRoot;
new Restore3Command()
.WithWorkingDirectory(testProjectDirectory)
.Execute()
.Should()
.Pass();
string workingDirectory = Directory.GetParent(testProjectDirectory).FullName;
new Run3Command()
.WithWorkingDirectory(workingDirectory)
.ExecuteWithCapturedOutput($"--project {Path.Combine(testProjectDirectory, testAppName)}.csproj")
.Should()
.Pass()
.And
.HaveStdOutContaining("Hello World!");
}
}
}