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()
|
|
|
|
|
{
|
|
|
|
|
var testInstance = TestAssetsManager.CreateTestInstance("BuildTestPortableProject")
|
|
|
|
|
.WithLockFiles();
|
|
|
|
|
|
|
|
|
|
var result = new BuildCommand(
|
|
|
|
|
projectPath: testInstance.TestRoot,
|
|
|
|
|
forcePortable: true)
|
|
|
|
|
.ExecuteWithCapturedOutput();
|
|
|
|
|
|
|
|
|
|
result.Should().Pass();
|
|
|
|
|
|
|
|
|
|
var outputBase = new DirectoryInfo(Path.Combine(testInstance.TestRoot, "bin", "Debug"));
|
|
|
|
|
|
|
|
|
|
var netstandardappOutput = outputBase.Sub("netstandardapp1.5");
|
|
|
|
|
|
2016-03-08 22:44:53 +00:00
|
|
|
|
netstandardappOutput.Should()
|
|
|
|
|
.Exist().And
|
|
|
|
|
.HaveFiles(new[]
|
|
|
|
|
{
|
|
|
|
|
"BuildTestPortableProject.deps",
|
2016-03-09 00:46:50 +00:00
|
|
|
|
"BuildTestPortableProject.deps.json",
|
2016-03-08 22:44:53 +00:00
|
|
|
|
"BuildTestPortableProject.dll",
|
|
|
|
|
"BuildTestPortableProject.pdb"
|
|
|
|
|
});
|
2016-03-02 01:42:44 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|