Add test for consuming .NET Standard 2.0 library from .NET Framework 4.6.1 project
This commit is contained in:
parent
ac8a464450
commit
c19ff8cc13
5 changed files with 98 additions and 0 deletions
40
test/EndToEnd/GivenNetFrameworkSupportsNetStandard2.cs
Normal file
40
test/EndToEnd/GivenNetFrameworkSupportsNetStandard2.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
using FluentAssertions;
|
||||
using Microsoft.DotNet.TestFramework;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace EndToEnd
|
||||
{
|
||||
public class GivenNetFrameworkSupportsNetStandard2 : TestBase
|
||||
{
|
||||
[WindowsOnlyFact]
|
||||
public void ANET461ProjectCanReferenceANETStandardProject()
|
||||
{
|
||||
var _testInstance = TestAssets.Get(TestAssetKinds.DesktopTestProjects, "NETFrameworkReferenceNETStandard20")
|
||||
.CreateInstance()
|
||||
.WithSourceFiles();
|
||||
|
||||
string projectDirectory = Path.Combine(_testInstance.Root.FullName, "TestApp");
|
||||
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
new BuildCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
new RunCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput()
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("This string came from the test library!");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue