Add an implicit operator to convert from Color to Style (#1160)

This commit is contained in:
Cédric Luthi
2023-05-10 15:20:12 +02:00
committed by GitHub
parent 3ec0fee795
commit 6acf9b8c63
16 changed files with 95 additions and 73 deletions

View File

@@ -1,7 +1,20 @@
namespace Spectre.Console.Tests.Unit;
public sealed class StyleTests
{
{
[Fact]
public void Should_Convert_From_Color_As_Expected()
{
// Given
Style style;
// When
style = Color.Red;
// Then
style.Foreground.ShouldBe(Color.Red);
}
[Fact]
public void Should_Combine_Two_Styles_As_Expected()
{