From cc140c963413a37de0bfceb18aa875fa0cfde23a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sat, 5 Nov 2016 22:48:32 +0900 Subject: [PATCH] Fix broken tests. --- osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs index eb8e9260df..bbd441d25a 100644 --- a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs @@ -8,6 +8,7 @@ using osu.Framework.Platform; using osu.Game.Database; using osu.Game.IPC; +using osu.Game.GameModes.Play; namespace osu.Game.Tests.Beatmaps.IO { @@ -45,7 +46,7 @@ public void TestImportOverIPC() var importer = new BeatmapImporter(client); if (!importer.Import(osz_path).Wait(1000)) - Assert.Fail(@"IPC took too long to send"); + Assert.Fail(@"IPC took too long to send"); ensureLoaded(osu, 10000); } @@ -78,7 +79,7 @@ private void ensureLoaded(OsuGameBase osu, int timeout = 100) @"BeatmapSet did not import to the database"); //ensure we were stored to beatmap database backing... - + Assert.IsTrue(resultSets.Count() == 1); IEnumerable resultBeatmaps = null; @@ -103,7 +104,7 @@ private void ensureLoaded(OsuGameBase osu, int timeout = 100) Assert.IsTrue(set.Beatmaps.Count > 0); - var beatmap = osu.Beatmaps.GetBeatmap(set.Beatmaps[0]); + var beatmap = osu.Beatmaps.GetBeatmap(set.Beatmaps.First(b => b.Mode == PlayMode.Osu)); Assert.IsTrue(beatmap.HitObjects.Count > 0); }