This repository has been archived by the owner on Dec 18, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
719 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
test/Microsoft.Dnx.Runtime.Tests/FrameworkNameHelperFacts.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.Versioning; | ||
using System.Threading.Tasks; | ||
using Microsoft.Dnx.Runtime.Helpers; | ||
using Xunit; | ||
|
||
namespace Microsoft.Dnx.Runtime.Tests | ||
{ | ||
public class FrameworkNameHelperFacts | ||
{ | ||
[Theory] | ||
|
||
// Short names | ||
[InlineData("dnx451", "DNX,Version=v4.5.1")] | ||
[InlineData("dnxcore50", "DNXCore,Version=v5.0")] | ||
[InlineData("net451", ".NETFramework,Version=v4.5.1")] | ||
|
||
// With profiles | ||
[InlineData("net40-client", ".NETFramework,Version=v4.0,Profile=Client")] | ||
|
||
// Full names | ||
[InlineData(".NETFramework,Version=v4.5.1", ".NETFramework,Version=v4.5.1")] | ||
[InlineData(".NETPortable,Version=v4.5,Profile=Profile123", ".NETPortable,Version=v4.5,Profile=Profile123")] | ||
|
||
// Portable names | ||
[InlineData("portable-Profile123", ".NETPortable,Version=v0.0,Profile=Profile123")] | ||
[InlineData("portable-Profile49", ".NETPortable,Version=v0.0,Profile=Profile49")] | ||
[InlineData("portable45-Profile49", ".NETPortable,Version=v4.5,Profile=Profile49")] | ||
|
||
// We only support full profile names. | ||
[InlineData("portable-net45+wp8", "Unsupported,Version=v0.0")] | ||
public void CorrectlyParsesFrameworkNames(string input, string fullName) | ||
{ | ||
Assert.Equal( | ||
new FrameworkName(fullName), | ||
FrameworkNameHelper.ParseFrameworkName(input)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.