Fix PublishTestAppWithContentPackage test to work on all platforms.

This commit is contained in:
Eric Erhardt 2016-04-13 18:38:15 -05:00
parent f6f1a52ec4
commit deef7f867f

View file

@ -16,13 +16,18 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
var testInstance = TestAssetsManager.CreateTestInstance("TestAppWithContentPackage")
.WithLockFiles();
var publishDir = Publish(testInstance);
var publishCommand = new PublishCommand(testInstance.TestRoot);
var publishResult = publishCommand.Execute();
publishResult.Should().Pass();
var publishDir = publishCommand.GetOutputDirectory(portable: false);
publishDir.Should().HaveFiles(new[]
{
"TestAppWithContentPackage.exe",
"TestAppWithContentPackage.dll",
"TestAppWithContentPackage.deps.json"
$"AppWithContentPackage{publishCommand.GetExecutableExtension()}",
"AppWithContentPackage.dll",
"AppWithContentPackage.deps.json"
});
// these files come from the contentFiles of the SharedContentA dependency
@ -37,15 +42,5 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
.Should()
.HaveFile("config.xml");
}
private DirectoryInfo Publish(TestInstance testInstance)
{
var publishCommand = new PublishCommand(testInstance.TestRoot);
var publishResult = publishCommand.Execute();
publishResult.Should().Pass();
return publishCommand.GetOutputDirectory(portable: false);
}
}
}