-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for .net standard 2.0 (#121)
Closes #120
- Loading branch information
Showing
14 changed files
with
109 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using Moq; | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Drawing; | ||
using System.Linq; | ||
using System.Reflection; | ||
using Tranquire; | ||
using Tranquire.Selenium; | ||
using Xunit; | ||
|
||
namespace Tranquire.Selenium.Tests | ||
{ | ||
public class HighlightTargetTests | ||
{ | ||
public static IEnumerable<object[]> SystemColors | ||
{ | ||
get | ||
{ | ||
return typeof(Color).GetProperties(BindingFlags.Public | BindingFlags.Static) | ||
.Where(p => p.PropertyType == typeof(Color)) | ||
.Select(p => new object[] { p.GetValue(null), p.Name == "LightGray" ? "LightGrey" : p.Name.ToString() }); | ||
} | ||
} | ||
|
||
[Theory, MemberData(nameof(SystemColors))] | ||
public void ToHtml_NamedColor_ShouldReturnCorrectValue(Color color, string expected) | ||
{ | ||
// act | ||
var actual = HighlightTarget.ToHtml(color); | ||
// assert | ||
Assert.Equal(expected, actual); | ||
} | ||
|
||
[Theory] | ||
[InlineData(131, 67, 140, "#83438C")] | ||
[InlineData(129, 131, 201, "#8183C9")] | ||
[InlineData(178, 217, 158, "#B2D99E")] | ||
public void ToHtml_Other_ShouldReturnCorrectValue(int r, int g, int b, string expected) | ||
{ | ||
// arrange | ||
var color = Color.FromArgb(r, g, b); | ||
// act | ||
var actual = HighlightTarget.ToHtml(color); | ||
// assert | ||
Assert.Equal(expected, actual); | ||
} | ||
|
||
[Fact] | ||
public void ToHtml_EmptyColor_ShouldReturnCorrectValue() | ||
{ | ||
// arrange | ||
var color = Color.Empty; | ||
// act | ||
var actual = HighlightTarget.ToHtml(color); | ||
// assert | ||
Assert.Equal(string.Empty, actual); | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if DEBUG | ||
#if DEBUG && NET462 | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Text; | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NET462 | ||
#if NET462 || NETSTANDARD2_0 | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Text; | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NET45 | ||
#if NET45 || NETSTANDARD2_0 | ||
using System; | ||
|
||
namespace Tranquire.Reporting | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#if NET45 | ||
#if NET45 || NETSTANDARD2_0 | ||
using System; | ||
using System.Diagnostics; | ||
|
||
|
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