mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-28 00:38:00 +01:00
* POC * View.DrawFrame now uses LineCanvas * Fixes #2531. Toplevel should redraw only if it's needed. * Fix toplevel when mdi is enabled preventing clear the screen twice. * Massive LineCanvis updates * Fixes #2534. Bounds isn't updating when the Frame is changed. * Almost everything works! * Had to disable a few tests but all unit test now pass again * Deleted ConsoleDriver.DrawWindowFrame; hacked ProgressBar * Deleted ConsoleDriver.DrawWindowTitle; moved to Frame.DrawTitle * Renames BorderFrame to Border * Removed old commented code * Tweaked scenario * Added auto convert \r\n to Enviornment.NewLine in TestHelpers.AssertEqual * Fix merge errors. * Fix AssertEqual newlines to platform-specific. * Refactored frames drawing; view adds to its lineview, superview renders them * New titlebar style based on Border.Top size; fixed bugs * wzard bug --------- Co-authored-by: BDisp <bd.bdisp@gmail.com>
44 lines
1.0 KiB
C#
44 lines
1.0 KiB
C#
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace Terminal.Gui.ViewTests {
|
|
public class BorderTests {
|
|
readonly ITestOutputHelper output;
|
|
|
|
public BorderTests (ITestOutputHelper output)
|
|
{
|
|
this.output = output;
|
|
}
|
|
|
|
[Fact]
|
|
public void View_BorderStyle_Defaults ()
|
|
{
|
|
var view = new View ();
|
|
Assert.Equal (LineStyle.None, view.BorderStyle);
|
|
Assert.Equal (Thickness.Empty, view.Border.Thickness);
|
|
}
|
|
|
|
[Fact]
|
|
public void View_SetBorderStyle ()
|
|
{
|
|
var view = new View ();
|
|
view.BorderStyle = LineStyle.Single;
|
|
Assert.Equal (LineStyle.Single, view.BorderStyle);
|
|
Assert.Equal (new Thickness(1), view.Border.Thickness);
|
|
|
|
view.BorderStyle = LineStyle.Double;
|
|
Assert.Equal (LineStyle.Double, view.BorderStyle);
|
|
Assert.Equal (new Thickness (1), view.Border.Thickness);
|
|
|
|
view.BorderStyle = LineStyle.None;
|
|
Assert.Equal (LineStyle.None, view.BorderStyle);
|
|
Assert.Equal (Thickness.Empty, view.Border.Thickness);
|
|
}
|
|
|
|
//[Fact]
|
|
//public void View_BorderStyleChanged ()
|
|
//{
|
|
//}
|
|
}
|
|
}
|