public void Basic()
{
var testCli = new CliUnitTestConsole(80,1);
ConsoleProvider.Current = testCli;
var app = new ConsoleApp(0, 0, 80, 1);
app.LayoutRoot.Add(new TextBox()).Fill();
var task = app.Start();
testCli.Input.Enqueue(new ConsoleKeyInfo('a', ConsoleKey.A, false, false, false));
string result = null;
app.Stopping.SubscribeForLifetime(() =>
{
result = testCli.Buffer.ToString();
}, app.LifetimeManager);
testCli.Input.Enqueue(new ConsoleKeyInfo('*', ConsoleKey.Escape, false, false, false));
task.Wait();
Assert.AreEqual(80, result.Length);
Console.WriteLine(result);
}