mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Migrate 210 tests to UnitTests.Parallelizable, add CreateFakeDriver helper, prove View.Draw() works in parallel tests, and provide comprehensive performance analysis (#4297)
* Initial plan * Migrate Category A test files to UnitTests.Parallelizable (135 tests) Co-authored-by: tig <585482+tig@users.noreply.github.com> * Add 11 ButtonTests to Parallelizable, remove from UnitTests Co-authored-by: tig <585482+tig@users.noreply.github.com> * Add comprehensive test migration report Co-authored-by: tig <585482+tig@users.noreply.github.com> * Add comprehensive performance analysis of UnitTests Co-authored-by: tig <585482+tig@users.noreply.github.com> * Migrate 2 Autocomplete tests and add Text tests analysis Co-authored-by: tig <585482+tig@users.noreply.github.com> * Add proof-of-concept: TextFormatter.Draw works in parallel tests with local driver Co-authored-by: tig <585482+tig@users.noreply.github.com> * Add CreateFakeDriver helper to ParallelizableBase and migrate 4 TextFormatterTests Co-authored-by: tig <585482+tig@users.noreply.github.com> * Remove proof-of-concept test from AutocompleteTests Co-authored-by: tig <585482+tig@users.noreply.github.com> * Move Scheme-accessing tests back to UnitTests to fix intermittent failures Co-authored-by: tig <585482+tig@users.noreply.github.com> * Update parallel tests README to document ConfigurationManager/SchemeManager restrictions Co-authored-by: tig <585482+tig@users.noreply.github.com> * Document static member restriction in parallel tests README Co-authored-by: tig <585482+tig@users.noreply.github.com> * Restore accidentally deleted ButtonTests.Accept_Cancel_Event_OnAccept_Returns_True test Co-authored-by: tig <585482+tig@users.noreply.github.com> * Migrate Accept_Cancel_Event_OnAccept_Returns_True test to Parallelizable Co-authored-by: tig <585482+tig@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
22
Tests/UnitTests/View/SchemeTests.cs
Normal file
22
Tests/UnitTests/View/SchemeTests.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Xunit;
|
||||
|
||||
namespace Terminal.Gui.ViewTests;
|
||||
|
||||
[Trait ("Category", "View.Scheme")]
|
||||
public class SchemeTests
|
||||
{
|
||||
[Fact]
|
||||
[UnitTests.AutoInitShutdown]
|
||||
public void View_Resolves_Attributes_From_Scheme ()
|
||||
{
|
||||
View view = new Label { SchemeName = "Base" };
|
||||
|
||||
foreach (VisualRole role in Enum.GetValues<VisualRole> ())
|
||||
{
|
||||
Attribute attr = view.GetAttributeForRole (role);
|
||||
Assert.NotEqual (default, attr.Foreground); // Defensive: avoid all-defaults
|
||||
}
|
||||
|
||||
view.Dispose ();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user