Cleans up/Refactors View.Subviews (#3962)

* 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
This commit is contained in:
Tig
2025-03-08 15:42:17 -07:00
committed by GitHub
parent 85cf6619ed
commit acb5979e6c
226 changed files with 7235 additions and 7188 deletions

View File

@@ -1,14 +1,10 @@
using UnitTests;
using UnitTests;
using Xunit.Abstractions;
namespace Terminal.Gui.ViewsTests;
public class WindowTests
public class WindowTests (ITestOutputHelper output)
{
private readonly ITestOutputHelper _output;
public WindowTests (ITestOutputHelper output) { _output = output; }
[Fact]
[AutoInitShutdown]
public void Activating_MenuBar_By_Alt_Key_Does_Not_Throw ()
@@ -69,7 +65,7 @@ public class WindowTests
│└────────────────┘│
│ │
└──────────────────┘",
_output
output
);
((FakeDriver)Application.Driver!).SetBufferSize (40, 20);
@@ -96,7 +92,7 @@ public class WindowTests
│└────────────────────────────────────┘│
│ │
└──────────────────────────────────────┘",
_output
output
);
((FakeDriver)Application.Driver!).SetBufferSize (20, 10);
@@ -113,7 +109,7 @@ public class WindowTests
│└────────────────┘│
│ │
└──────────────────┘",
_output
output
);
top.Dispose ();
}