dotnet-installer/test/dotnet-build.Tests/BuildPortableTests.cs

38 lines
1.1 KiB
C#
Raw Normal View History

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");
netstandardappOutput.Should()
.Exist().And
.HaveFiles(new[]
{
"BuildTestPortableProject.deps",
2016-03-09 00:46:50 +00:00
"BuildTestPortableProject.deps.json",
"BuildTestPortableProject.dll",
"BuildTestPortableProject.pdb"
});
}
}
}