mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 04:13:11 +08:00
Add exit test.
This commit is contained in:
parent
b9d99b5f40
commit
f67ad7b8e8
@ -66,7 +66,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
assertCurrent();
|
assertCurrent();
|
||||||
pushNext();
|
pushNext();
|
||||||
AddAssert(@"assert there are only 2 items", () => breadcrumbs.Items.Count() == 2);
|
AddAssert(@"only 2 items", () => breadcrumbs.Items.Count() == 2);
|
||||||
|
AddStep(@"exit current", () => changedScreen.Exit());
|
||||||
|
AddAssert(@"current screen is first", () => startScreen == changedScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -76,7 +78,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void pushNext() => AddStep(@"push next screen", () => currentScreen = ((TestScreen)currentScreen).PushNext());
|
private void pushNext() => AddStep(@"push next screen", () => currentScreen = ((TestScreen)currentScreen).PushNext());
|
||||||
private void assertCurrent() => AddAssert(@"assert the current screen is correct", () => currentScreen == changedScreen);
|
private void assertCurrent() => AddAssert(@"current screen is correct", () => currentScreen == changedScreen);
|
||||||
|
|
||||||
private abstract class TestScreen : OsuScreen
|
private abstract class TestScreen : OsuScreen
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user