namespace Cthangover.Mods.Dialog.Tests
{
using Cthangover.Mods.Dialog.Action;
using Cthangover.Core.UI.Dialog;
///
/// Test action that only counts its lifecycle calls: how often the runtime ran,
/// constructed and destructed it. Waits for a click by default, so a test can
/// park the dialog on it and look at where the runtime stands.
///
public class ProbeAction : ActionCommand
{
/// Number of calls.
public int Runs { get; private set; }
/// Number of calls.
public int Constructs { get; private set; }
/// Number of calls.
public int Destructs { get; private set; }
/// Counts the run.
public override void DoRun(DialogRuntime runtime)
{
Runs++;
}
/// Counts the construction.
public override void DoConstruct()
{
Constructs++;
}
/// Counts the destruction.
public override void DoDestruct()
{
Destructs++;
}
}
}