1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 13:22:55 +08:00

Adjust storyboard decoder test in line with changes

This commit is contained in:
Bartłomiej Dach 2020-05-18 22:10:02 +02:00
parent e211785704
commit 6e27247cdf

View File

@ -26,7 +26,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
var storyboard = decoder.Decode(stream);
Assert.IsTrue(storyboard.HasDrawable);
Assert.AreEqual(5, storyboard.Layers.Count());
Assert.AreEqual(6, storyboard.Layers.Count());
StoryboardLayer background = storyboard.Layers.FirstOrDefault(l => l.Depth == 3);
Assert.IsNotNull(background);
@ -56,6 +56,13 @@ namespace osu.Game.Tests.Beatmaps.Formats
Assert.IsTrue(foreground.VisibleWhenPassing);
Assert.AreEqual("Foreground", foreground.Name);
StoryboardLayer overlay = storyboard.Layers.FirstOrDefault(l => l.Depth == int.MinValue);
Assert.IsNotNull(overlay);
Assert.IsEmpty(overlay.Elements);
Assert.IsTrue(overlay.VisibleWhenFailing);
Assert.IsTrue(overlay.VisibleWhenPassing);
Assert.AreEqual("Overlay", overlay.Name);
int spriteCount = background.Elements.Count(x => x.GetType() == typeof(StoryboardSprite));
int animationCount = background.Elements.Count(x => x.GetType() == typeof(StoryboardAnimation));
int sampleCount = background.Elements.Count(x => x.GetType() == typeof(StoryboardSampleInfo));