mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* tweaked version # for v1.0.0-beta.10 * tweaked version # for v1.0.0-beta.11 * Updated readme and revision history for 1.0 * excluding test results * Added support for viewing code coverage results with Fine Code Coverage * add generating CC to CI/CD * refactored unit test namespaces * more refactoring. commented out failing test. * Removed UnitTests and UICatalog from code coverage reporting * made Application and test more deterministic * disabled Multi_Thread_Toplevels because it is currently broken and don't understand why * updated threading test per @bdisp * testing cc badge stuff * another test * using coverlet.settings * trying copy * trying cp. duh. * trying mv. * wrong path * print * chaging badge output for testing * yaml error * fixed code coverage * moved dimtests to core
47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Terminal.Gui;
|
|
using Xunit;
|
|
|
|
// Alais Console to MockConsole so we don't accidentally use Console
|
|
using Console = Terminal.Gui.FakeConsole;
|
|
|
|
namespace Terminal.Gui.Core {
|
|
public class ResponderTests {
|
|
[Fact]
|
|
public void New_Initializes ()
|
|
{
|
|
var r = new Responder ();
|
|
Assert.NotNull (r);
|
|
Assert.Equal ("Terminal.Gui.Responder", r.ToString ());
|
|
Assert.False (r.CanFocus);
|
|
Assert.False (r.HasFocus);
|
|
}
|
|
|
|
[Fact]
|
|
public void New_Methods_Return_False ()
|
|
{
|
|
var r = new Responder ();
|
|
|
|
Assert.False (r.ProcessKey (new KeyEvent () { Key = Key.Unknown }));
|
|
Assert.False (r.ProcessHotKey (new KeyEvent () { Key = Key.Unknown }));
|
|
Assert.False (r.ProcessColdKey (new KeyEvent () { Key = Key.Unknown }));
|
|
Assert.False (r.OnKeyDown (new KeyEvent () { Key = Key.Unknown }));
|
|
Assert.False (r.OnKeyUp (new KeyEvent () { Key = Key.Unknown }));
|
|
Assert.False (r.MouseEvent (new MouseEvent () { Flags = MouseFlags.AllEvents }));
|
|
Assert.False (r.OnMouseEnter (new MouseEvent () { Flags = MouseFlags.AllEvents }));
|
|
Assert.False (r.OnMouseLeave (new MouseEvent () { Flags = MouseFlags.AllEvents }));
|
|
Assert.False (r.OnEnter (new View ()));
|
|
Assert.False (r.OnLeave (new View ()));
|
|
}
|
|
|
|
// Generic lifetime (IDisposable) tests
|
|
[Fact]
|
|
public void Dispose_Works ()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|