Files
Terminal.Gui/Tests/UnitTests/View/DiagnosticsTests.cs
Tig fdeaa8331b Fixes #4298 - Updates test namespaces (#4299)
* Refactored test namespaces.
Moved some tests that were in wrong project.
Code cleanup

* Parrallel -> Parallel
2025-10-20 14:14:38 -06:00

31 lines
986 B
C#

#nullable enable
using Xunit.Abstractions;
namespace UnitTests.ViewTests;
/// <summary>
/// Tests <see cref="View.Diagnostics"/> static property and <see cref="ViewDiagnosticFlags"/> enum.
/// </summary>
/// <param name="output"></param>
[Trait ("Category", "Output")]
public class DiagnosticTests ()
{
/// <summary>
/// /// Tests <see cref="View.Diagnostics"/> static property and <see cref="ViewDiagnosticFlags"/> enum.
/// ///
/// </summary>
[Fact]
public void Diagnostics_Sets ()
{
// View.Diagnostics is a static property that returns the current diagnostic flags.
Assert.Equal (ViewDiagnosticFlags.Off, View.Diagnostics);
// View.Diagnostics can be set to a new value.
View.Diagnostics = ViewDiagnosticFlags.Thickness;
Assert.Equal (ViewDiagnosticFlags.Thickness, View.Diagnostics);
// Ensure we turn off at the end of the test
View.Diagnostics = ViewDiagnosticFlags.Off;
}
}