From a765f2502daa9760786e9c20baf688ddcb8a4a27 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 14 May 2019 15:14:00 +0900 Subject: [PATCH] Add simple test case for FullscreenOverlay --- .../Online/TestCaseFullscreenOverlay.cs | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 osu.Game.Tests/Visual/Online/TestCaseFullscreenOverlay.cs diff --git a/osu.Game.Tests/Visual/Online/TestCaseFullscreenOverlay.cs b/osu.Game.Tests/Visual/Online/TestCaseFullscreenOverlay.cs new file mode 100644 index 0000000000..925e6e1349 --- /dev/null +++ b/osu.Game.Tests/Visual/Online/TestCaseFullscreenOverlay.cs @@ -0,0 +1,40 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using NUnit.Framework; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Shapes; +using osu.Game.Overlays; +using osuTK.Graphics; + +namespace osu.Game.Tests.Visual.Online +{ + [TestFixture] + public class TestCaseFullscreenOverlay : OsuTestCase + { + private FullscreenOverlay overlay; + + protected override void LoadComplete() + { + base.LoadComplete(); + + Add(overlay = new TestFullscreenOverlay()); + AddStep(@"toggle", overlay.ToggleVisibility); + } + + private class TestFullscreenOverlay : FullscreenOverlay + { + public TestFullscreenOverlay() + { + Children = new Drawable[] + { + new Box + { + Colour = Color4.Black, + RelativeSizeAxes = Axes.Both, + }, + }; + } + } + } +}