Fixing full framework tests

This commit is contained in:
Livar Cunha 2016-10-31 16:22:10 -07:00
parent c2f60cede4
commit 9139c4006b
10 changed files with 127 additions and 15 deletions

View file

@ -29,16 +29,24 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
[WindowsOnlyFact]
public void It_resolves_desktop_apps_defaulting_to_Debug_Configuration()
{
var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var configuration = "Debug";
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
.CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
.WithNuGetConfig(_repoDirectoriesProvider.TestPackages);
var restoreCommand = new RestoreCommand()
.WithWorkingDirectory(testInstance.Root)
.WithRuntime(runtime)
.ExecuteWithCapturedOutput()
.Should().Pass();
var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root)
.WithConfiguration(configuration)
.WithRuntime(runtime)
.WithCapturedOutput()
.Execute()
.Should().Pass();
@ -60,16 +68,24 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
[WindowsOnlyFact]
public void It_resolves_desktop_apps_when_configuration_is_Debug()
{
var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var configuration = "Debug";
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
.CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
.WithNuGetConfig(_repoDirectoriesProvider.TestPackages);
var restoreCommand = new RestoreCommand()
.WithWorkingDirectory(testInstance.Root)
.WithRuntime(runtime)
.ExecuteWithCapturedOutput()
.Should().Pass();
var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root)
.WithConfiguration(configuration)
.WithRuntime(runtime)
.Execute()
.Should().Pass();
@ -89,12 +105,19 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
[WindowsOnlyFact]
public void It_resolves_desktop_apps_when_configuration_is_Release()
{
var configuration = "Release";
var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var configuration = "Debug";
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
.CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
.WithNuGetConfig(_repoDirectoriesProvider.TestPackages);
var restoreCommand = new RestoreCommand()
.WithWorkingDirectory(testInstance.Root)
.WithRuntime(runtime)
.ExecuteWithCapturedOutput()
.Should().Pass();
var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root)
@ -120,12 +143,19 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
[WindowsOnlyFact]
public void It_resolves_desktop_apps_using_configuration_passed_to_create()
{
var configuration = "Release";
var runtime = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var configuration = "Debug";
var testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "AppWithProjTool2Fx")
.CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
.WithNuGetConfig(_repoDirectoriesProvider.TestPackages);
var restoreCommand = new RestoreCommand()
.WithWorkingDirectory(testInstance.Root)
.WithRuntime(runtime)
.ExecuteWithCapturedOutput()
.Should().Pass();
var buildCommand = new BuildCommand()
.WithWorkingDirectory(testInstance.Root)