mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* initial commit * Clarified RootMouseEvent * Added application mouse coord tests * ViewToScreen -> BoundsToScreen * Simplified View.Move * Simplified View.Move * Updated API docs; made some functions private * more ViewLayout cleanup * more ViewLayout cleanup * Added View.ScreenToBounds and low-level coord unit tests * Partial fix * Refactored Application.OnMouseEvent... Tests still fail and views are broken * Added Bounds/FrameToScreen * Remamed ScreenToView->ScreenToFrame * All unit tests pass * Fixed ListView * Fixed TableView * Fixed ColorPicker * Fixed RadioGroup * Fixed ListView unit tests * Fixed line drawing scenario * Updated comment * fixed api doc typo * fixed formatting * added some thickness Contains unit tests * MouseEvent api doc updates * More thickness tests * More thickness tests
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);
|
|
view.Dispose ();
|
|
}
|
|
|
|
[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);
|
|
view.Dispose ();
|
|
}
|
|
|
|
//[Fact]
|
|
//public void View_BorderStyleChanged ()
|
|
//{
|
|
//}
|
|
} |