Fix test scene using local beatmap

This commit is contained in:
smoogipoo 2020-08-07 21:07:59 +09:00
parent 5002d69f69
commit 028040344a
1 changed files with 2 additions and 4 deletions

View File

@ -18,17 +18,15 @@ public class TestSceneBeatmapSkinResources : OsuTestScene
[Resolved]
private BeatmapManager beatmaps { get; set; }
private WorkingBeatmap beatmap;
[BackgroundDependencyLoader]
private void load()
{
var imported = beatmaps.Import(new ZipArchiveReader(TestResources.OpenResource("Archives/ogg-beatmap.osz"))).Result;
beatmap = beatmaps.GetWorkingBeatmap(imported.Beatmaps[0]);
Beatmap.Value = beatmaps.GetWorkingBeatmap(imported.Beatmaps[0]);
}
[Test]
public void TestRetrieveOggSample() => AddAssert("sample is non-null", () => beatmap.Skin.GetSample(new SampleInfo("sample")) != null);
public void TestRetrieveOggSample() => AddAssert("sample is non-null", () => Beatmap.Value.Skin.GetSample(new SampleInfo("sample")) != null);
[Test]
public void TestRetrieveOggTrack() => AddAssert("track is non-null", () => MusicController.CurrentTrack.IsDummyDevice == false);