mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Adds ViewportSettings.Transparent (#3886)
This commit is contained in:
32
UnitTests/View/Draw/DrawEventTests.cs
Normal file
32
UnitTests/View/Draw/DrawEventTests.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
#nullable enable
|
||||
using System.Text;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
namespace Terminal.Gui.ViewTests;
|
||||
|
||||
[Trait ("Category", "Output")]
|
||||
public class DrawEventTests (ITestOutputHelper _output)
|
||||
{
|
||||
|
||||
[Fact]
|
||||
[AutoInitShutdown]
|
||||
public void DrawContentComplete_Event_Is_Always_Called ()
|
||||
{
|
||||
var viewCalled = false;
|
||||
var tvCalled = false;
|
||||
|
||||
var view = new View { Width = 10, Height = 10, Text = "View" };
|
||||
view.DrawComplete += (s, e) => viewCalled = true;
|
||||
var tv = new TextView { Y = 11, Width = 10, Height = 10 };
|
||||
tv.DrawComplete += (s, e) => tvCalled = true;
|
||||
|
||||
var top = new Toplevel ();
|
||||
top.Add (view, tv);
|
||||
RunState runState = Application.Begin (top);
|
||||
Application.RunIteration (ref runState);
|
||||
|
||||
Assert.True (viewCalled);
|
||||
Assert.True (tvCalled);
|
||||
top.Dispose ();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user