Updating the SDK to an SDK that includes globing for source and resources implicitly.

This commit is contained in:
Livar Cunha 2017-01-04 14:17:43 -08:00 committed by Livar Cunha
parent dfb0a28224
commit 3a4e23e373
67 changed files with 55 additions and 327 deletions

View file

@ -49,18 +49,14 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
}
[Fact]
public void MigratingEmptyBuildOptionsPopulatesOnlyCompileAndEmbeddedResource()
public void MigratingEmptyBuildOptionsGeneratesAnEmptyCSProj()
{
var mockProj = RunBuildOptionsRuleOnPj(@"
{
""buildOptions"": { }
}");
mockProj.Items.Count().Should().Be(2);
mockProj.Items.First(i => i.ItemType == "Compile").Include.Should().Be(@"**\*.cs");
mockProj.Items.First(i => i.ItemType == "Compile").Exclude.Should().BeEmpty();
mockProj.Items.First(i => i.ItemType == "EmbeddedResource").Include.Should().Be(@"compiler\resources\**\*;**\*.resx");
mockProj.Items.First(i => i.ItemType == "EmbeddedResource").Exclude.Should().Be("@(EmbeddedResource)");
mockProj.Items.Count().Should().Be(0);
}
[Fact]
@ -84,6 +80,22 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Tests
mockProj.Items.Count().Should().Be(0);
}
[Fact]
public void MigratingConsoleProjectWithoutCustomSourcesOrResourcesDoesNotEmitCompileAndEmbeddedResource()
{
var mockProj = RunBuildOptionsRuleOnPj(@"
{
""buildOptions"": {
""emitEntryPoint"": true
},
""frameworks"": {
""netcoreapp1.0"": {}
}
}");
mockProj.Items.Count().Should().Be(0);
}
public void MigratingOutputNamePopulatesAssemblyName()
{
var mockProj = RunBuildOptionsRuleOnPj(@"