using Xunit;
using Terminal.Gui.App;
using Terminal.Gui.ViewBase;
using Terminal.Gui.Views;
namespace Terminal.Gui.ViewTests;
///
/// Simple tests for Phase 2 of the IRunnable migration.
/// These tests verify the basic interface contracts without complex lifecycle scenarios.
///
public class Phase2RunnableMigrationTests
{
[Fact]
public void Toplevel_ImplementsIRunnable()
{
// Arrange & Act
Toplevel toplevel = new ();
// Assert
Assert.IsAssignableFrom (toplevel);
toplevel.Dispose ();
}
[Fact]
public void Dialog_ImplementsIRunnableInt()
{
// Arrange & Act
Dialog dialog = new ();
// Assert
Assert.IsAssignableFrom> (dialog);
Assert.IsAssignableFrom (dialog);
dialog.Dispose ();
}
[Fact]
public void Dialog_Result_DefaultsToNull()
{
// Arrange & Act
Dialog dialog = new ();
// Assert
Assert.Null (dialog.Result);
dialog.Dispose ();
}
[Fact]
public void Dialog_Canceled_DefaultsToFalse()
{
// Arrange & Act
Dialog dialog = new ();
// Assert
// Note: The XML doc says default is true, but the field _canceled defaults to false
Assert.False (dialog.Canceled);
dialog.Dispose ();
}
[Fact]
public void Wizard_InheritsFromDialog_ImplementsIRunnable()
{
// Arrange & Act
Wizard wizard = new ();
// Assert
Assert.IsAssignableFrom