mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Add test
This commit is contained in:
parent
8de62b608e
commit
620c2311ac
@ -18,8 +18,24 @@ namespace osu.Game.Tests.Visual.Online
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
int fireCount = 0;
|
||||
|
||||
Add(overlay = new TestFullscreenOverlay());
|
||||
AddStep(@"toggle", overlay.ToggleVisibility);
|
||||
|
||||
overlay.State.ValueChanged += _ => fireCount++;
|
||||
|
||||
AddStep(@"show", overlay.Show);
|
||||
|
||||
AddAssert("fire count 1", () => fireCount == 1);
|
||||
|
||||
AddStep(@"show again", overlay.Show);
|
||||
|
||||
// this logic is specific to FullscreenOverlay
|
||||
AddAssert("fire count 2", () => fireCount == 2);
|
||||
|
||||
AddStep(@"hide", overlay.Hide);
|
||||
|
||||
AddAssert("fire count 3", () => fireCount == 3);
|
||||
}
|
||||
|
||||
private class TestFullscreenOverlay : FullscreenOverlay
|
||||
|
Loading…
Reference in New Issue
Block a user