2016-03-02 01:42:44 +00:00
|
|
|
|
using System.IO;
|
|
|
|
|
using Microsoft.DotNet.Tools.Test.Utilities;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Builder.Tests
|
|
|
|
|
{
|
|
|
|
|
public class BuildPortableTests : TestBase
|
|
|
|
|
{
|
|
|
|
|
[Fact]
|
|
|
|
|
public void BuildingAPortableProjectProducesDepsFile()
|
|
|
|
|
{
|
2016-03-09 19:36:16 +00:00
|
|
|
|
var testInstance = TestAssetsManager.CreateTestInstance("PortableTests")
|
2016-03-02 01:42:44 +00:00
|
|
|
|
.WithLockFiles();
|
|
|
|
|
|
|
|
|
|
var result = new BuildCommand(
|
2016-03-09 19:36:16 +00:00
|
|
|
|
projectPath: Path.Combine(testInstance.TestRoot, "PortableApp"))
|
2016-03-02 01:42:44 +00:00
|
|
|
|
.ExecuteWithCapturedOutput();
|
|
|
|
|
|
|
|
|
|
result.Should().Pass();
|
|
|
|
|
|
2016-03-09 19:36:16 +00:00
|
|
|
|
var outputBase = new DirectoryInfo(Path.Combine(testInstance.TestRoot, "PortableApp", "bin", "Debug"));
|
2016-03-02 01:42:44 +00:00
|
|
|
|
|
2016-03-09 19:36:16 +00:00
|
|
|
|
var netstandardappOutput = outputBase.Sub("netstandard1.5");
|
2016-03-02 01:42:44 +00:00
|
|
|
|
|
2016-03-08 22:44:53 +00:00
|
|
|
|
netstandardappOutput.Should()
|
|
|
|
|
.Exist().And
|
|
|
|
|
.HaveFiles(new[]
|
|
|
|
|
{
|
2016-03-09 19:36:16 +00:00
|
|
|
|
"PortableApp.deps",
|
|
|
|
|
"PortableApp.deps.json",
|
|
|
|
|
"PortableApp.dll",
|
|
|
|
|
"PortableApp.pdb"
|
2016-03-08 22:44:53 +00:00
|
|
|
|
});
|
2016-03-02 01:42:44 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|