turn on the web test

This commit is contained in:
Bryan Thornbury 2016-10-20 15:04:53 -07:00
parent ecbc45098d
commit 481aebd18a
2 changed files with 23 additions and 3 deletions

View file

@ -11,6 +11,8 @@ using Microsoft.DotNet.Tools.Migrate;
using Build3Command = Microsoft.DotNet.Tools.Test.Utilities.Build3Command;
using BuildCommand = Microsoft.DotNet.Tools.Test.Utilities.BuildCommand;
using System.Runtime.Loader;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.DotNet.Migration.Tests
{
@ -90,14 +92,23 @@ namespace Microsoft.DotNet.Migration.Tests
VerifyAllMSBuildOutputsRunnable(projectDirectory);
}
[Fact(Skip="https://github.com/dotnet/cli/issues/4299")]
public void It_migrates_dotnet_new_web_with_outputs_containing_project_json_outputs()
[Fact]
public void It_migrates_old_dotnet_new_web_without_tools_with_outputs_containing_project_json_outputs()
{
var testInstance = TestAssetsManager
.CreateTestInstance("ProjectJsonWebTemplate");
.CreateTestInstance("ProjectJsonWebTemplate")
.WithLockFiles();
var projectDirectory = testInstance.Path;
var globalDirectory = Path.Combine(projectDirectory, "..");
var projectJsonFile = Path.Combine(projectDirectory, "project.json");
WriteGlobalJson(globalDirectory);
var projectJson = JObject.Parse(File.ReadAllText(projectJsonFile));
projectJson.Remove("tools");
File.WriteAllText(projectJsonFile, projectJson.ToString());
var outputComparisonData = GetComparisonData(projectDirectory);
var outputsIdentical =
@ -591,5 +602,14 @@ namespace Microsoft.DotNet.Migration.Tests
MSBuildBuildOutputs = msBuildBuildOutputs;
}
}
private void WriteGlobalJson(string globalDirectory)
{
var file = Path.Combine(globalDirectory, "global.json");
File.WriteAllText(file, @"
{
""projects"": [ ]
}");
}
}
}