This commit is contained in:
Dean Herbert 2019-06-11 15:39:12 +09:00
parent 8de62b608e
commit 620c2311ac
1 changed files with 17 additions and 1 deletions

View File

@ -18,8 +18,24 @@ protected override void LoadComplete()
{ {
base.LoadComplete(); base.LoadComplete();
int fireCount = 0;
Add(overlay = new TestFullscreenOverlay()); 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 private class TestFullscreenOverlay : FullscreenOverlay