Fix test that depended on old output directory layout

(cherry picked from commit 27dc8032dd)
This commit is contained in:
Daniel Plaisted 2017-09-01 13:53:17 -07:00 committed by Nick Guerrera
parent 02a07e6d8e
commit 78eb0a7719
2 changed files with 18 additions and 6 deletions

View file

@ -0,0 +1,17 @@
using System.IO;
namespace Microsoft.DotNet.New.Tests
{
public class AspNetNuGetConfiguration
{
public static void WriteNuGetConfigWithAspNetPrivateFeeds(string path)
{
string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config";
using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName))
using (Stream output = File.OpenWrite(path))
{
input.CopyTo(output);
}
}
}
}

View file

@ -50,12 +50,7 @@ namespace Microsoft.DotNet.New.Tests
if (useNuGetConfigForAspNet)
{
string resourceName = "dotnet-new.Tests.NuGet.tempaspnetpatch.config";
using (Stream input = typeof(GivenThatIWantANewAppWithSpecifiedType).Assembly.GetManifestResourceStream(resourceName))
using (Stream output = File.OpenWrite(Path.Combine(rootPath, "NuGet.Config")))
{
input.CopyTo(output);
}
AspNetNuGetConfiguration.WriteNuGetConfigWithAspNetPrivateFeeds(Path.Combine(rootPath, "NuGet.Config"));
}
if (skipSpaWebpackSteps)