2 changed files with 94 additions and 0 deletions
@ -0,0 +1,33 @@ |
|||
using Avalonia.Media; |
|||
using Xunit; |
|||
|
|||
namespace Avalonia.Visuals.UnitTests.Media |
|||
{ |
|||
public class PenTests |
|||
{ |
|||
[Fact] |
|||
public void Changing_Thickness_Raises_Invalidated() |
|||
{ |
|||
var target = new Pen(); |
|||
var raised = false; |
|||
|
|||
target.Invalidated += (s, e) => raised = true; |
|||
target.Thickness = 18; |
|||
|
|||
Assert.True(raised); |
|||
} |
|||
|
|||
[Fact] |
|||
public void Changing_Brush_Color_Raises_Invalidated() |
|||
{ |
|||
var brush = new SolidColorBrush(Colors.Red); |
|||
var target = new Pen { Brush = brush }; |
|||
var raised = false; |
|||
|
|||
target.Invalidated += (s, e) => raised = true; |
|||
brush.Color = Colors.Green; |
|||
|
|||
Assert.True(raised); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue