diff --git a/osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs b/osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs index 02e4a87a7a..6ad63a5fbb 100644 --- a/osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs @@ -5,6 +5,7 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using Moq; using NUnit.Framework; using osu.Game.Beatmaps; using osu.Game.Rulesets; @@ -62,6 +63,17 @@ namespace osu.Game.Tests.Beatmaps working.ResetEvent.Set(); } + [Test] + public void TestGetPlayableRulesetLoadFailure() + { + var working = new TestWorkingBeatmap(new Beatmap()); + + // by default mocks return nulls if not set up, which is actually desired here to simulate a ruleset load failure scenario. + var ruleset = new Mock(); + + Assert.Throws(() => working.GetPlayableBeatmap(ruleset.Object)); + } + public class TestNeverLoadsWorkingBeatmap : TestWorkingBeatmap { public ManualResetEventSlim ResetEvent = new ManualResetEventSlim();