mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Subview clean up * New Add/Remove event pattern * Using Logging * cleanup * Subview -> SubView * Test code cleanup. Killed many warnings. * Fix tznind feedback * Refactored AllViewTest helpers * Moved keyboard tests to parallel * Moved mouse tests to parallel * Moved view tests to parallel * Test code cleanup. Killed many warnings. * dupe test * Some mouse tests can't run in parallel because MouseGrabView * Made SpinnerView more testable * Moved more tests * SubViews to IReadOnlyCollection<View> * SubViews to IReadOnlyCollection<View> 2 * scrollbar tests * shortcut tests * Use InternalSubViews vs. _subviews * Nuked View.IsAdded. Added View.SuperViewChanged. * API doc updats * Unit Test tweak * Unit Test tweak
29 lines
670 B
C#
29 lines
670 B
C#
using Xunit.Abstractions;
|
|
|
|
namespace Terminal.Gui.ViewTests;
|
|
|
|
public class AdornmentSubViewTests ()
|
|
{
|
|
[Fact]
|
|
public void Setting_Thickness_Causes_Adornment_SubView_Layout ()
|
|
{
|
|
var view = new View ();
|
|
var subView = new View ();
|
|
view.Margin.Add (subView);
|
|
view.BeginInit ();
|
|
view.EndInit ();
|
|
var raised = false;
|
|
|
|
subView.SubViewLayout += LayoutStarted;
|
|
view.Margin.Thickness = new Thickness (1, 2, 3, 4);
|
|
view.Layout ();
|
|
Assert.True (raised);
|
|
|
|
return;
|
|
void LayoutStarted (object sender, LayoutEventArgs e)
|
|
{
|
|
raised = true;
|
|
}
|
|
}
|
|
}
|