fix tests
This commit is contained in:
parent
fe8f440ed6
commit
5523f24712
2 changed files with 9 additions and 9 deletions
|
@ -216,7 +216,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
|||
|
||||
var migratedProjectReferenceItem = migratedProjectReferenceItems.First();
|
||||
migratedProjectReferenceItem.Include.Should().Be(projectReference);
|
||||
migratedProjectReferenceItem.Condition.Should().Be(" '$(Foo)' == 'bar' and '$(Bar)' == 'foo'");
|
||||
migratedProjectReferenceItem.Condition.Should().Be(" '$(Bar)' == 'foo' and '$(Foo)' == 'bar' ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ using Microsoft.DotNet.ProjectJsonMigration.Rules;
|
|||
|
||||
namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
||||
{
|
||||
public class GivenThatIWantToMigrateProjectFramework : TestBase
|
||||
public class GivenThatIWantToMigrateTFMs : TestBase
|
||||
{
|
||||
[Fact(Skip="Emitting this until x-targetting full support is in")]
|
||||
public void Migrating_netcoreapp_project_Does_not_populate_TargetFrameworkIdentifier_and_TargetFrameworkVersion()
|
||||
|
@ -51,12 +51,12 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
|||
.FromTestAssetBase("TestLibraryWithMultipleFrameworks")
|
||||
.SaveToDisk(testDirectory);
|
||||
|
||||
var projectContext = ProjectContext.Create(testDirectory, FrameworkConstants.CommonFrameworks.NetCoreApp10);
|
||||
var projectContexts = ProjectContext.CreateContextForEachFramework(testDirectory);
|
||||
var mockProj = ProjectRootElement.Create();
|
||||
|
||||
var migrationSettings = new MigrationSettings(testDirectory, testDirectory, "1.0.0", mockProj);
|
||||
var migrationInputs = new MigrationRuleInputs(
|
||||
new[] { projectContext },
|
||||
projectContexts,
|
||||
mockProj,
|
||||
mockProj.AddItemGroup(),
|
||||
mockProj.AddPropertyGroup());
|
||||
|
@ -69,7 +69,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void Migrating_Single_TFM_project_Populates_TargetFrameworks_with_short_tfm()
|
||||
public void Migrating_Single_TFM_project_does_not_Populate_TargetFrameworks()
|
||||
{
|
||||
var testDirectory = Temp.CreateDirectory().Path;
|
||||
var testPJ = new ProjectJsonBuilder(TestAssetsManager)
|
||||
|
@ -80,21 +80,21 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
|
|||
})
|
||||
.SaveToDisk(testDirectory);
|
||||
|
||||
var projectContext = ProjectContext.Create(testDirectory, FrameworkConstants.CommonFrameworks.NetCoreApp10);
|
||||
var projectContexts = ProjectContext.CreateContextForEachFramework(testDirectory);
|
||||
var mockProj = ProjectRootElement.Create();
|
||||
|
||||
// Run BuildOptionsRule
|
||||
var migrationSettings = new MigrationSettings(testDirectory, testDirectory, "1.0.0", mockProj);
|
||||
var migrationInputs = new MigrationRuleInputs(
|
||||
new[] { projectContext },
|
||||
projectContexts,
|
||||
mockProj,
|
||||
mockProj.AddItemGroup(),
|
||||
mockProj.AddPropertyGroup());
|
||||
|
||||
new MigrateTFMRule().Apply(migrationSettings, migrationInputs);
|
||||
Console.WriteLine(mockProj.RawXml);
|
||||
|
||||
mockProj.Properties.Count(p => p.Name == "TargetFrameworks").Should().Be(1);
|
||||
mockProj.Properties.First(p => p.Name == "TargetFrameworks").Value.Should().Be("netcoreapp1.0");
|
||||
mockProj.Properties.Count(p => p.Name == "TargetFrameworks").Should().Be(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue