mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Refactored test namespaces. Moved some tests that were in wrong project. Code cleanup * Parrallel -> Parallel
20 lines
761 B
C#
20 lines
761 B
C#
namespace UnitTests_Parallelizable.DrawingTests;
|
|
|
|
public class DrawContextTests
|
|
{
|
|
[Fact (Skip = "Region Union is broken")]
|
|
public void AddDrawnRectangle_Unions ()
|
|
{
|
|
DrawContext drawContext = new DrawContext ();
|
|
|
|
drawContext.AddDrawnRectangle (new (0, 0, 1, 1));
|
|
drawContext.AddDrawnRectangle (new (1, 0, 1, 1));
|
|
|
|
Assert.Equal (new Rectangle (0, 0, 2, 1), drawContext.GetDrawnRegion ().GetBounds ());
|
|
Assert.Equal (2, drawContext.GetDrawnRegion ().GetRectangles ().Length);
|
|
|
|
drawContext.AddDrawnRectangle (new (0, 0, 4, 1));
|
|
Assert.Equal (new Rectangle (0, 1, 4, 1), drawContext.GetDrawnRegion ().GetBounds ());
|
|
Assert.Single (drawContext.GetDrawnRegion ().GetRectangles ());
|
|
}
|
|
} |