A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
696 B

using Avalonia.Media;
using Xunit;
namespace Avalonia.Base.UnitTests.Media;
public class PathGeometryTests
{
[Fact]
public void PathGeometry_Triggers_Invalidation_On_Figures_Add()
{
var segment = new PolyLineSegment()
{
Points = [new Point(1, 1), new Point(2, 2)]
};
var figure = new PathFigure()
{
Segments = [segment],
IsClosed = false,
IsFilled = false,
};
var target = new PathGeometry();
var changed = false;
target.Changed += (_, _) => { changed = true; };
target.Figures?.Add(figure);
Assert.True(changed);
}
}