using AcDream.App.UI; using AcDream.App.UI.Layout; namespace AcDream.App.Tests.UI; public class UiButtonTests { private static (uint, int, int) NoTex(uint _) => (0, 0, 0); private bool _clicked; [Fact] public void Click_InvokesOnClick() { var b = new UiButton(new ElementInfo { Type = 1, Width = 46, Height = 18 }, NoTex) { OnClick = () => _clicked = true }; b.OnEvent(new UiEvent(0, null, UiEventType.Click)); Assert.True(_clicked); } [Fact] public void NotClickThrough_SoItReceivesClicks() { var b = new UiButton(new ElementInfo { Type = 1 }, NoTex); Assert.False(b.ClickThrough); } }