1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Add failing assert for seasonal background equality

This commit is contained in:
Bartłomiej Dach 2021-06-15 23:19:33 +02:00
parent 81c43bcf19
commit 30703d518c

View File

@ -161,15 +161,18 @@ namespace osu.Game.Tests.Visual.Background
private void loadNextBackground() private void loadNextBackground()
{ {
SeasonalBackground previousBackground = null;
SeasonalBackground background = null; SeasonalBackground background = null;
AddStep("create next background", () => AddStep("create next background", () =>
{ {
previousBackground = (SeasonalBackground)backgroundContainer.SingleOrDefault();
background = backgroundLoader.LoadNextBackground(); background = backgroundLoader.LoadNextBackground();
LoadComponentAsync(background, bg => backgroundContainer.Child = bg); LoadComponentAsync(background, bg => backgroundContainer.Child = bg);
}); });
AddUntilStep("background loaded", () => background.IsLoaded); AddUntilStep("background loaded", () => background.IsLoaded);
AddAssert("background is different", () => !background.Equals(previousBackground));
} }
private void assertAnyBackground() private void assertAnyBackground()