Moving the InferLegacyRestoreRuntime method to Test.Utilities, since it is needed only by tests.

This commit is contained in:
Livar Cunha 2016-10-10 09:52:39 -07:00
parent 09d811fdbd
commit c2bce2e2cc
15 changed files with 46 additions and 45 deletions

View file

@ -8,6 +8,7 @@ using FluentAssertions;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.InternalAbstractions;
using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.Tools.Test.Utilities;
using Moq;
using NuGet.Frameworks;
using Xunit;
@ -69,7 +70,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
[Fact]
public void It_passes_a_RuntimeOutputDir_variable_to_the_pre_compile_scripts_if_rid_is_set_in_the_ProjectContext()
{
var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var fixture = ScriptVariablesFixture.GetFixtureWithRids(rid);
fixture.PreCompileScriptVariables.Should().ContainKey("compile:RuntimeOutputDir");
fixture.PreCompileScriptVariables["compile:RuntimeOutputDir"].Should().Be(fixture.RuntimeOutputDir);
@ -128,7 +129,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
[Fact]
public void It_passes_a_RuntimeOutputDir_variable_to_the_post_compile_scripts_if_rid_is_set_in_the_ProjectContext()
{
var rid = DotnetRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var rid = DotnetLegacyRuntimeIdentifiers.InferLegacyRestoreRuntimeIdentifier();
var fixture = ScriptVariablesFixture.GetFixtureWithRids(rid);
fixture.PostCompileScriptVariables.Should().ContainKey("compile:RuntimeOutputDir");
fixture.PostCompileScriptVariables["compile:RuntimeOutputDir"].Should().Be(fixture.RuntimeOutputDir);